bluebird75 / winpdb

Fork of the official winpdb with improvements
Other
91 stars 24 forks source link

RPDBTERM not defined error #41

Closed ILoveMuffins closed 3 years ago

ILoveMuffins commented 4 years ago

I've tried several ways to debug file with winpdb running like this: $ winpdb a.py but I've always had this undeclared variable error. Couldn't google anything. I see it's declared in "rpdb2.py" file, outside the "rpdb/" folder Here's my traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/winpdb.py", line 1288, in __wrapper
    self.m_f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/rpdb/session_manager.py", line 197, in launch
    return self.__smi.launch(fchdir, command_line, interpreter, fload_breakpoints)
  File "/usr/lib/python3.8/site-packages/rpdb/session_manager.py", line 1160, in launch
    self._spawn_server(fchdir, ExpandedFilename, args, rid, interpreter)
  File "/usr/lib/python3.8/site-packages/rpdb/session_manager.py", line 1269, in _spawn_server
    terminal_command = CalcTerminalCommand()
  File "/usr/lib/python3.8/site-packages/rpdb/session_manager.py", line 2385, in CalcTerminalCommand
    if RPDBTERM in os.environ:
NameError: name 'RPDBTERM' is not defined

Btw. I think there will also be problems with the others global variables in the CalcTerminalCommand() function inside session_maneger.py

bluebird75 commented 4 years ago

Can you try with the latest git version ? This specific problem should be fixed now,

ILoveMuffins commented 4 years ago

I have tried with master branch and now I have:

Traceback (most recent call last):
  File "winpdb.py", line 1288, in __wrapper
    self.m_f(*args, **kwargs)
  File "/home/user/Projects/winpdb/rpdb/session_manager.py", line 206, in launch
    return self.__smi.launch(fchdir, command_line, interpreter, fload_breakpoints)
  File "/home/user/Projects/winpdb/rpdb/session_manager.py", line 1169, in launch
    self._spawn_server(fchdir, ExpandedFilename, args, rid, interpreter)
  File "/home/user/Projects/winpdb/rpdb/session_manager.py", line 1278, in _spawn_server
    terminal_command = CalcTerminalCommand()
  File "/home/user/Projects/winpdb/rpdb/session_manager.py", line 2404, in CalcTerminalCommand
    if IsPrefixInEnviron(KDE_PREFIX):
NameError: name 'IsPrefixInEnviron' is not defined
bluebird75 commented 4 years ago

Should be better now with the latest git version.

I did some refactoring in june and these problems did not show up on my computer, sorry for the incovenience.

ILoveMuffins commented 4 years ago

Thanks, it's working now