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 173501

Summary: debugger can't be used with projects that have spaces in their paths
Product: python Reporter: djlawler <djlawler>
Component: DebuggerAssignee: jymen <jymen>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description djlawler 2009-10-01 15:13:26 UTC
Debugging fails when projects are located in directories where the full path has spaces in it.  For example if your 
projects are under the My Documents directory you are out of luck.  I added a print statement in jpydaemon.py in 
parseSingleCommand to print the commmand and it prints out:

command: SETARGS null
command: DBG C:/Documents and Settings/User/My Documents/Programming Projects/pybzedit/cpython/pyBzEdit.py

which promptly fails:
 
Exception in thread MainThread:
Traceback (most recent call last):
  File "c:\Python26\lib\threading.py", line 525, in __bootstrap_inner
    self.run()
  File "C:\Documents and Settings\User\.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:/Documents and Settings/User/My Documents/Programming Projects/pybzedit/cpython/pyBzEdit.py", line 1, in 
<module>
    import os
  File "C:/Documents and Settings/User/My Documents/Programming Projects/pybzedit/cpython/pyBzEdit.py", line 1, in 
<module>
    import os
  File "C:\Documents and Settings\User\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 724, in 
trace_dispatch
    self.dispatchLineAndBreak(mainDebugger, frame , lthread )
  File "C:\Documents and Settings\User\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 604, in 
dispatchLineAndBreak
    lthread.additionalInfo.breakHere(frame,lthread)
  File "C:\Documents and Settings\User\.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 "C:\Documents and Settings\User\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 1448, in 
parseSubCommand
    temp = int(temp)
ValueError: invalid literal for int() with base 10: 'Settings\\LD003\\My'

Debug session normal end

I can change jpydaemon.py to parse the commands differently to get around this, but I think the better answer would be 
to enclose paths in quotes?

Regards,

David
Comment 1 djlawler 2009-10-01 15:41:13 UTC
Ahhhh - it looks like this is really a problem for the BP+ command.  If I do not set a breakpoint in the program at 
all, then the issue does not happen.

David
Comment 2 kenorb 2011-03-31 11:14:53 UTC

*** This bug has been marked as a duplicate of bug 196842 ***