<div dir="ltr"><div><div><div><div><div><div><div><div>Hi<br><br></div>I've created a Python script <b>that runs flawlessly when run from the command line</b>.  However, when running it <u><i><b>in the debug mode</b></i></u> in Eric4, the debugger seems to be kicked out.<br>
<br></div><div>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).<br>
</div><div><br>I've attached the source file of the script, together with a 7-zip file that contains the input files that are needed.<br><br></div><div>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...<br>
</div><div><br>If you want to run the script, two input parameters are needed:<br></div>- a path to the directory containing the input sources<br></div>- a path to the directory where the 3 output files should be written (1 txt file and 2 csv files, used as Excel input)<br>
<br></div>I've also added screenshots from the Eric4 debugger at the moment the problem arises.<br><br><img alt="Inline images 3" src="cid:ii_14134d7f1d2503f8"><br><br><img alt="Inline images 4" src="cid:ii_14134d838b6a4b96"><br>
<br></div>I've also added a screenshot of the different package versions I'm using with Eric4.<br><br><img alt="Inline images 2" src="cid:ii_14134d760b488568"><br><br></div><div>I've also added the way I invoke the debugger (paths may differ, of course, just to show that you need two input parameters).<br>
<br><img alt="Inline images 5" src="cid:ii_14134d87cbda88d2"><br></div><div><br></div>What could cause this behaviour?<br><br></div><div><i><b>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...</b></i><br>
</div><div><br></div>Best rgds,<br></div>--Geert<br></div>