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

Geert Vancompernolle geert.vancompernolle at gmail.com
Thu Sep 19 08:03:42 BST 2013


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
mechanism to detect if the content of the file given contains a known
Python type (using the ast method "literal_eval") or a kind of "error
message".  Just to let you know...

If you want to run the script, two input parameters are needed:
- a path to the directory containing the input sources
- a path to the directory where the 3 output files should be written (1 txt
file and 2 csv files, used as Excel input)

I've also added screenshots from the Eric4 debugger at the moment the
problem arises.

[image: Inline images 3]

[image: Inline images 4]

I've also added a screenshot of the different package versions I'm using
with Eric4.

[image: Inline images 2]

I've also added the way I invoke the debugger (paths may differ, of course,
just to show that you need two input parameters).

[image: Inline images 5]

What could cause this behaviour?

*PS: noteworthy to metion that, when you start the debugger with F5 (and
stopping at the start of the Python script) and then press F6 (so, don't go
into step mode using F8), all is working find in the debugger too...*

Best rgds,
--Geert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric4_invalidsyntaxissue.png
Type: image/png
Size: 28819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric4_fileopenissue.png
Type: image/png
Size: 26440 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric4_startdebugsession.png
Type: image/png
Size: 36242 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric4_versions.png
Type: image/png
Size: 20628 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sonarmetrics.py
Type: application/octet-stream
Size: 8292 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sonar.7z
Type: application/octet-stream
Size: 2006 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20130919/940e8d47/attachment-0003.obj>


More information about the Eric mailing list