matiasmorant / SublimeDebugger

Graphical Debugger for Sublime Text
MIT License
60 stars 6 forks source link

Tcp pipe breaks when switching languages #17

Open matiasmorant opened 6 years ago

cbrinley219 commented 6 years ago

I believe this may be the same issue. is there currently any work around to use python2?

input file

import sys
print sys.argv

went to Tools -> Debugger -> Set Language -> Python2 went to Tools -> Debugger -> Start Debugging

Console output

doesn't want to connect 0 5005
doesn't want to connect 1 5005
doesn't want to connect 2 5005
doesn't want to connect 3 5005
doesn't want to connect 4 5005
doesn't want to connect 5 5005
doesn't want to connect 6 5005
doesn't want to connect 7 5005
doesn't want to connect 8 5005
doesn't want to connect 9 5005
fully connected
language: python2
Started Debugging
Exception in thread Thread-33:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 1142, in run
  File "mydebugger in /Users/1334890/Library/Application Support/Sublime Text 3/Installed Packages/Python Debugger.sublime-package", line 45, in <lambda>
  File "backends.db in /Users/1334890/Library/Application Support/Sublime Text 3/Installed Packages/Python Debugger.sublime-package", line 37, in runscript
  File "backends.comm_utils in /Users/1334890/Library/Application Support/Sublime Text 3/Installed Packages/Python Debugger.sublime-package", line 171, in f
BrokenPipeError: [Errno 32] Broken pipe

Restarting sublime text seems to revert the language back to the default. Python 3 (sublime built-in)

matiasmorant commented 6 years ago

Yes, this is the bug. Sometimes that just happens. What I do for now is restart sublime and try again, until it works. By doing that, i'm able to successfully debug python2 code. I have just published a new release which might (or might not) solve the problem. check if it works for you.

cbrinley219 commented 6 years ago

Thanks! your change seemed to fix the issue