I would use the remote debugging on Pycharm 2.5.
I can debug the main process but is it possible debug also the subprocess?
In the local debug there is the option "Attach to subprocess automatically while debugging". Isn't there for remote debug?
Thanks.
Multiprocess debug isn't supported for Remote Debug in PyCharm. I've created an issue for that.
But to debug multiple processes running remotely you can use Remote Interpreters. For remote run they provide the same debugging abilities as if it is local.
Related
I can connect to the remote linux server from VS code through SSH by using the Remote-SSH extension.
I can run linux commands from VS code terminal.
I also have the python debugger extension in VS code.
But I do not understand how do we debug python code. When we start debugging we get below options
Python file
Module
Remote Attach
Attach using process Id
For a linux command from my python repo can I connect using Process Id? Is it possible to debug this way?
Good Day!
I have a script which runs on Python3.5, It spawns a subprocess which runs a java application.
subprocess.run(["/usr/bin/java","-jar",<pathToMyJar>])
This Java application internally invokes some of my python scripts which runs on Jython2.5.
So I want to debug those Jython scripts, I'm enabling remote debugging in the start of my jython script. Check the following code which does that,
sys.path.append(os.path.join(libspath, "pycharm-debug.egg"))
import pydevd
pydevd.settrace('localhost', port=9999, stdoutToserver=True, stderrToServer=True, suspend=True)
I have created a debug server on my Pycharm with same host and port as above, every time before running my script I start my server on Pycharm but I can't able to debug my Jython scripts.On pycharm I can able to see waiting for process connection.., after that nothing happens.
what is wrong with my approach, is there anything I'm missing here.
I'm using Pycharm-2018.1.2 professional version on ubuntu.
I configured PyCharm Python Interpreter as a remote Docker Python Interpreter:
I do not have any problem to run my tests using this configuration.
But when I try to run them in Debug, execution freeze to this waiting for connection... status:
So my questions are:
What am I doing bad?
How can I execute my tests in Debug in PyCharm using a Docker Python Interpreter ?
This problem is due to pydevd hardcoded host ip address in PyCharm sources (10.0.0.2).
So if you do not use VirtualBox to manage and run your docker-machine, you will not be able to easily launch your tests in debug.
It should be patched in PyCharm 2016.3 for docker interpreter and in PyCharm 2016.3.1 for docker-compose interpreter.
Awaiting this release, a workaround exist here, on JetBrain website.
I use Windows host and Ubuntu guest with VirtualBox. Flask application sources are shared from host to guest using VirtualBox shared folders and my virtualenvs and nginx are on guest.
Now I should open SSH session to restart my Flask application (debugging with reload enabled, but in case of syntax error it needs a rerun) and I have no debug capabilities.
I used to use PyDev and Windows installation of Python with debug and restart right from IDE and miss this.
For debugging you can use the remote debugger: http://pydev.org/manual_adv_remote_debugger.html (just point it to your main box IP and things should work).
Now, currently PyDev does not support launching a process through ssh, so, that'd be a new feature request (which you can request at: https://sw-brainwy.rhcloud.com/tracker/PyDev).
I'm using py.test to run a series of python scripts that test an external windows GUI application.
I'm trying to run these tests on a remote ssh-enabled windows machines using fabric (using Bitvise SSH server on the remote end) but of course the tests which require GUI access fail.
I know that py.test has a package called xdist, but I guess it will suffer from the same problem if the channel we use is SSH.
Has anybody solved the issue of running remote GUI applications in Windows through SSH? SSH has been quite convenient for me to run remote deployment commands, and it would logically follow that py.test would be one of such commands.