[Eric] Debugger kicks out while stepping through the code, while normal operation of the same script runs without issues.

Detlev Offenbach detlev at die-offenbachs.de
Sun Sep 22 14:48:33 BST 2013


Hello,

the issue was that the debugger backend considered syntax errors as 
being a 'real' syntax error in a source file. This has been changed and only 
syntax errors reporting a real filename will be treated as syntax errors. All 
other (misused) syntax errors will be handled like any ordinary exception.

This will be part of the next release. If it is needed urgently, please get the 
eric sources via the repository and install from them.

Regards,
Detlev

On Friday 20 September 2013, 06:47:35 Geert Vancompernolle wrote:
> Hi Detlev,
> 
> Yes, I had breakpoints set.  Anyway, I'm always starting the Eric4 
debugger
> with the option "Don't stop at first line" switched off (that is, the
> debugger anyhow starts in step mode).  In the script I've given, it only
> takes a minimal time to reach the problematic area.  Just put an extra
> breakpoint at line 133 and then step into the code.
> 
> As said before, normally the input files contain a Python list, like the
> one below:
> 
> [{"id":168,"key":"org.droidtv.tvjar","name":"TvJar","scope":"PRJ","qualifier
> 
":"TRK","date":"2013-09-11T09:39:09+0200","lname":"TvJar","lang":"java","
ver
> sion":"1.0","description":"","msr":[{"key":"blocker_violations","val":0.0,"f
> rmt_val":"0"},{"key":"critical_violations","val":19.0,"frmt_val":"19"},{"key
> ":"major_violations","val":1253.0,"frmt_val":"1,253"}]}]
> 
> When analysing a file with such content, all is fine.
> 
> However, due to missing information from the process that generates the
> input files for the script (has nothing to do with this Python file!), I
> sometimes do get files with the following content:
> 
> device/tpvision/common/plf/storage ==> MISSING ANALYSIS!!! <==
> 
> And those files have to be treated differently.  That's why, when such file
> content is detected by the function ast.literal_eval() (line 137 in the
> Python code), it generates an exception.  But that's what I deliberatly
> want.   Since then, I know it's not a Python list and in that case, I
> generate an error message in my output report through the "use" or 
"abuse"
> (depends on how you look at it) of the "except"ion thrown.
> 
> And as said before, in a normal run (e.g. running the script from the
> command line, both Linux as well as Windows), it works fine.  Even when
> running in Eric4 without breakpoints (that is, start the script in the
> debugger and once it stops at the first line, hit F6), all works fine.
> 
> But the moment one breakpoint has been set (*wherever in the code, it
> doesn't matter*) *and the debugger has stopped at least once* before 
that
> famous line 137, I get the below mentioned error condition in the 
debugger.
> 
> Hope you have enough information now to reproduce and analyse the 
issue.
> If not, don't hesitate to come back on it and ask for more information.
> 
> Best rgds,
> --Geert
> 
> On 19 September 2013 18:38, Detlev Offenbach <detlev at die-
offenbachs.de>wrote:
> > **
> > 
> > Hello,
> > 
> > 
> > 
> > did you have any breakpoints set when this error shows up? Please 
think
> > about any additional info, that could be relevant.
> > 
> > 
> > 
> > Just to let you know, your error report is one of the best I've seen, very
> > informative already. I'll have a look at it on the weekend.
> > 
> > 
> > 
> > Detlev
> > 
> > On Thursday 19 September 2013, 09:03:42 Geert Vancompernolle 
wrote:
> > > Hi
> > > 
> > > 
> > > 
> > > I've created a Python script *that runs flawlessly when run from the
> > > 
> > > command line*. However, when running it *in the debug mode* in 
Eric4,
> > > the
> > > 
> > > debugger seems to be kicked out.
> > > 
> > > 
> > > 
> > > I'm running Eric4 4.5.14 on a Windows7 PC (I had the issue also with
> > > 
> > > previous versions of Eric4, but to be sure it was not related to 
missing
> > 
> > an
> > 
> > > update, I moved to the latest version of Eric4, currently available).
> > > 
> > > 
> > > 
> > > I've attached the source file of the script, together with a 7-zip file
> > > 
> > > that contains the input files that are needed.
> > > 
> > > 
> > > 
> > > The problem happens at line 137 in the "sonarmetrics.py" file 
(command:
> > > 
> > > 'result = ast.literal_eval(filecontent)'). I'm "misusing" the try-except
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130922/e4e83bee/attachment-0001.html>


More information about the Eric mailing list