Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 171753 - Exceptions Terminate the Debugging Session
Exceptions Terminate the Debugging Session
Product: python
Classification: Unclassified
Component: Debugger
Sun Solaris
: P2 (vote)
Assigned To: jymen
Depends on:
  Show dependency treegraph
Reported: 2009-09-08 21:09 UTC by William Leonard
Modified: 2017-06-23 08:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description William Leonard 2009-09-08 21:09:53 UTC
Take the following sample code:

import os

if __name__ == "__main__":
        print os.environ ["PWDx"];
    except KeyError:
        print "Key error";
print "Hello World";

Since there is no PWDx environment variable, a KeyError will be thrown. However, upon hitting the line 'print os.environ
[PWDx]', the debugger will terminate. Here's the output from the console:

>>>Exception in thread MainThread:Traceback (most recent call last):
  File "/export/home/bleonard/.netbeans/6.7/jython-2.5/Lib/", line 247, in _Thread__bootstrap
  File "/export/home/bleonard/.netbeans/6.7/config/nbPython/debug/nbpythondebug/", line 590, in run
    exec self._cmd in self._myglobals,self._mylocals
  File "<string>", line 1, in <module>
  File "/tmp/NewPythonProject/src/", line 8, in <module>
    print os.environ ["PWDx"];
  File "/tmp/NewPythonProject/src/", line 8, in <module>
    print os.environ ["PWDx"];
  File "/export/home/bleonard/.netbeans/6.7/config/nbPython/debug/nbpythondebug/", line 681, in trace_dispatch
Debug session normal end
    if not self.discardedException(arg) :
  File "/export/home/bleonard/.netbeans/6.7/config/nbPython/debug/nbpythondebug/", line 631, in
    tb  = exc_stuff[2]
IndexError: index out of range: 2
Comment 1 Jenselme 2017-06-22 22:23:59 UTC
Should be solved with the new debugger when we add it. The debugger is currently disabled. Closing this since there is no point into importing it elsewhere.
Comment 2 Jiri Kovalsky 2017-06-23 08:05:55 UTC
Thanks for your evaluation Julien. Reporter, if you think your issue is still valid and needs to be addressed, don't hesitate to reopen it with additional information. Closing for now.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo