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.
Summary: | Python debugger can't cope with user exceptions | ||
---|---|---|---|
Product: | python | Reporter: | timf <timf> |
Component: | Debugger | Assignee: | Lou Dasaro <mr_lou_d> |
Status: | CLOSED WONTFIX | ||
Severity: | blocker | CC: | ardavis26, Jenselme, mr_lou_d |
Priority: | P2 | ||
Version: | 8.0.2 | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://netbeans.org/bugzilla/show_bug.cgi?id=171753 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
timf
2009-09-29 12:21:24 UTC
Oh, I suspect this is completely the wrong thing to do, but found that if I just hacked out the contents of the if-statement in: ~/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py so that it would never fire at all, debugging would 'work' inside exceptions (though again, perhaps this causes trouble down the line!) 678 if event == 'exception': 679 # set user exception info to be able to populate to client side later 680 # mainDebugger.user_exception(frame,arg) # Tim commented out this bit: 681 #if not self.discardedException(arg) : 682 # mainDebugger.populate_exception(arg) 683 # mainDebugger.setTrace(None) 684 # # leave debuggee 685 # # raise BdbQuit 686 # mainDebugger.terminateDaemon() 687 # return None # stop trace on current frame 688 return self.trace_dispatch I Traced this using ea 2 I was able to reproduce this issue on windows Traceback follows: [LOG]PythonDebugger : overall Starting >>>[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>*sys-package-mgr*: processing new jar, 'C:\ADData\NetBeans 6.7.1\python1\jython-2.5\jython.jar' >>>*sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\rt.jar' >>>*sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\jsse.jar' *sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\jce.jar' *sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\charsets.jar' >>>*sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\ext\dnsns.jar' *sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\ext\localedata.jar' *sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\ext\sunjce_provider.jar' *sys-package-mgr*: processing new jar, 'C:\bea10\jdk150_15\jre\lib\ext\sunpkcs11.jar' >>>c:\documents and settings\davisal.mms\.netbeans\6.7\config\nbpython\debug\nbpythondebug\jpydaemon.py args = ['C:\\Documents and Settings\\davisal.MMS\\.netbeans\\6.7\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '29100'] localDebuggee= None JPyDbg connecting localhost on in= 29100 /out= 29101 JPyDbgI0001 : connected to localhost >>>c:\documents and settings\davisal.mms\.netbeans\6.7\config\nbpython\debug\nbpythondebug\jpydaemon.py >>>[LOG]PythonDebugger : overall Starting [LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>[LOG]PythonDebugger : overall Starting >>>[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>[LOG]PythonDebugger : overall Starting [LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>c:\documents and settings\davisal.mms\.netbeans\6.7\config\nbpython\debug\nbpythondebug\jpydaemon.py args = ['C:\\Documents and Settings\\davisal.MMS\\.netbeans\\6.7\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '29115'] localDebuggee= None JPyDbg connecting localhost on in= 29115 /out= 29116 JPyDbgI0001 : connected to localhost >>>[stdout:]Hello World >>>[stdout:]hello world >>>[stdout:]do stuff >>>Exception in thread MainThread:Traceback (most recent call last): File "C:\ADData\NetBeans 6.7.1\python1\jython-2.5\Lib\threading.py", line 247, in _Thread__bootstrap self.run() File "C:\Documents and Settings\davisal.MMS\.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 "C:/ADData/projects/pyDebugTest/src/pydebugtest.py", line 16, in <module> raise MyException("something bad happened") File "C:/ADData/projects/pyDebugTest/src/pydebugtest.py", line 16, in <module> raise MyException("something bad happened") File "C:\Documents and Settings\davisal.MMS\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 681, in trace_dispatch if not self.discardedException(arg) : File "C:\Documents and Settings\davisal.MMS\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 631, in discardedException tb = exc_stuff[2] IndexError: index out of range: 2 >>>Debug session normal end [LOG]PythonDebugger : overall Starting [LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>c:\documents and settings\davisal.mms\.netbeans\6.7\config\nbpython\debug\nbpythondebug\jpydaemon.py args = ['C:\\Documents and Settings\\davisal.MMS\\.netbeans\\6.7\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '29115'] localDebuggee= None JPyDbg connecting localhost on in= 29115 /out= 29116 JPyDbgI0001 : connected to localhost >>>[stdout:]Hello World >>>[stdout:]hello world >>>[stdout:]do stuff >>>[stdout:]Not to worry [stdout:]ending here Debug session normal end [LOG]PythonDebugger : overall Starting [LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ... [LOG]This window is an interactive debugging context aware Python Shell [LOG]where you can enter python console commands while debugging >>>c:\documents and settings\davisal.mms\.netbeans\6.7\config\nbpython\debug\nbpythondebug\jpydaemon.py args = ['C:\\Documents and Settings\\davisal.MMS\\.netbeans\\6.7\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '29115'] localDebuggee= None JPyDbg connecting localhost on in= 29115 /out= 29116 JPyDbgI0001 : connected to localhost >>>[stdout:]Hello World >>>[stdout:]hello world >>>[stdout:]do stuff >>>Exception in thread MainThread:Traceback (most recent call last): File "C:\ADData\NetBeans 6.7.1\python1\jython-2.5\Lib\threading.py", line 247, in _Thread__bootstrap self.run() File "C:\Documents and Settings\davisal.MMS\.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 "C:/ADData/projects/pyDebugTest/src/pydebugtest.py", line 16, in <module> raise MyException("something bad happened") File "C:/ADData/projects/pyDebugTest/src/pydebugtest.py", line 16, in <module> raise MyException("something bad happened") File "C:\Documents and Settings\davisal.MMS\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 681, in trace_dispatch if not self.discardedException(arg) : File "C:\Documents and Settings\davisal.MMS\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 631, in discardedException tb = exc_stuff[2] Debug session normal end IndexError: index out of range: 2 >>> Reduced to P2 as per guidelines at http://wiki.netbeans.org/BugPriorityGuidelines 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. 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. |