This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 171753

Summary: Exceptions Terminate the Debugging Session
Product: python Reporter: William Leonard <bleonard>
Component: DebuggerAssignee: jymen <jymen>
Status: CLOSED WONTFIX    
Severity: blocker CC: Jenselme
Priority: P2    
Version: 6.x   
Hardware: Sun   
OS: Solaris   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=173258
Issue Type: DEFECT Exception Reporter:

Description William Leonard 2009-09-08 21:09:53 UTC
Take the following sample code:

import os

if __name__ == "__main__":
    try:
        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/threading.py", line 247, in _Thread__bootstrap
    self.run()
  File "/export/home/bleonard/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 590, in run
    exec self._cmd in self._myglobals,self._mylocals
  File "<string>", line 1, in <module>
  File "/tmp/NewPythonProject/src/newpythonproject.py", line 8, in <module>
    print os.environ ["PWDx"];
  File "/tmp/NewPythonProject/src/newpythonproject.py", line 8, in <module>
    print os.environ ["PWDx"];
  File "/export/home/bleonard/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py", 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/jpydaemon.py", line 631, in
discardedException
    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.