Running Python Debugger from Windows onto Linux Mounted Drive

I've used Pycharm personally for months now and really like it, I thought I'd give it a try on my work environment.

I am unable to install Pycharm on Linux so I thought I could install Pycharm, and view/edit my Linux files on a mounted disk. All this works well until I try to do something like debug. I noticed that all my scripts that had os.walk werent walking, and I realized Pycharm sees my scripts working directory as A:/ which is the letter name for the drive it's mounted on.

Is there anything I can do to use Pycharm on a Windows ENV to do debug work on a Unix env?
3 comments
Comment actions Permalink
The fact that your script sees working directory as A:/ means you run your code locally (on the same machine that PyCharm is being run on) not remotely (on different machine than PyCharm is being run on).

If you want to debug code which is being run remotely then you have to set up remote debugging – http://www.jetbrains.com/pycharm/webhelp/remote-debugging.html
0
Comment actions Permalink
Thanks for the help, I've been able to configure my Pycharm for remote debug, I'm able to run my scripts from my Windows environment to the Linux one, when I try to run my debug configuration I get the following error though:

Error running [script]
           Can't run remote python interpreter: Couldn't obtain remote socket from output ('0.0.0.0', 46262)
           , stderr stty: standard input: Invalid argument
           
Also, when running my script normally with pydevd.settrace() my script hangs and gives the following output to my console.

Traceback (most recent call last):
  File "/pycharm-debug-py3k.egg/pydevd_comm.py", line 313, in OnRun
    cmd_id = int(args[0])
ValueError: invalid literal for int() with base 10: 'SSH-2.0-ReflectionForSecureIT_7.2.1.99\r'
Can't process net command: SSH-2.0-ReflectionForSecureIT_7.2.1.99
Traceback (most recent call last):
  File "/pycharm-debug-py3k.egg/pydevd_comm.py", line 313, in OnRun
    cmd_id = int(args[0])
ValueError: invalid literal for int() with base 10: 'Protocol mismatch.'
Can't process net command: Protocol mismatch.

It will hang like this until I kill the script, any ideas on what could be causing these errors?
1
Comment actions Permalink
I've been using "Python Debug Server" (the second option given at http://www.jetbrains.com/pycharm/webhelp/remote-debugging.html) for some time now and had no problems. Don't know what's wrong. Make sure you follow steps from documentation.

As to the first option and "Couldn't obtain remote socket from output (...)" error I get this error too and have no idea why. Will ask in separate thread here.
0

Please sign in to leave a comment.