views:

379

answers:

1

Ubuntu 9.10 Netbeans 6.7.1

Whenever I start the debugger it crashes out with the error below.

I've set the project properties to the correct version of python, although it doesn't seem to make any difference what it is set to.

I've also noticed that the PythonConsole window reports that Python 2.5.0+ is running regardless of the version that is selected in the project properties.

Be grateful for any help, I'm stumped.

[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 
Exception in thread MainThread:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
Debug session normal end
  File "/home/sky/.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 "/media/Docs_/MyDocuments/websites/Machine Inteligence/Code/MachineInteligence/src/machineinteligence.py", line 1, in <module>
__author__="sky"
  File "/media/Docs_/MyDocuments/websites/Machine Inteligence/Code/MachineInteligence/src/machineinteligence.py", line 1, in <module>
__author__="sky"
  File "/home/sky/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 724, in trace_dispatch
    self.dispatchLineAndBreak(mainDebugger, frame , lthread )
  File "/home/sky/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 604, in dispatchLineAndBreak
    lthread.additionalInfo.breakHere(frame,lthread)
  File "/home/sky/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 810, in breakHere
    while ( self.dbg.parseSubCommand(  self.dbg._connection.getNextDebuggerCommand() , frame , lthread ) == FREEZE ):
  File "/home/sky/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 1452, in parseSubCommand
    hits = int(hits)
ValueError: invalid literal for int() with base 10: ''
/home/sky/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py
args =  ['/home/sky/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py', 'localhost', '29100']
localDebuggee= None
JPyDbg connecting  localhost  on in=  29100 /out= 29100
JPyDbgI0001 : connected to  localhost
+2  A: 

Hello, I've experienced some issues with the Netbeans Python debugger as well. Python support in Netbeans is not yet perfect and does not come anywhere near to Java Netbeans peformance and support.

You could try checking python platforms in Tools -> Python Platforms; try removing and readding the interpreter, thus forcing library reloading.

Also, try removing the __ author __ line which seems to confuse the debugger, and remember that usually the Netbeans debugger sets an "automatic breakpoint" at the first possible line in the script, and this sometimes led me to think it was "hung" while it was just waiting for me to tell it to continue.

If you just need a debugger, and you don't strictly need to use Netbeans, I'd advise you to try Winpdb (standalone crossplatform debugger, despite the name), which works very good even tough it doesn't support watches and requires a minimum of tinkering with PYTHONPATH in order to run your projects; or you could use Eclipse+Pydev; while I'm not a huge Eclipse fan, I think the Pydev its debugger simply works great.

Commercial IDEs support other debuggers, but I think they'd be out of the scope of your question.

Alan Franzoni
Unfortunatly your suggestions didn't solve the problem, but thanks for your help.I currently use eclipse, but I keep having problems with it, so I thought I would try something else.Windb looks interesting, I'll give it a look.
SystemicPlural