PyDev.Debugger icon indicating copy to clipboard operation
PyDev.Debugger copied to clipboard

Enable stdout-to-server and stderr-to-server from command-line

Open retnikt opened this issue 5 years ago • 2 comments
trafficstars

When running pydevd.py directly from the command-line, I would like to be able to specify the stdoutToServer and stderrToServer options, something like --stdout-to-server and --stderr-to-server.

retnikt avatar Jun 10 '20 14:06 retnikt

What's the use case for running it directly on the command line and customizing that flag?

fabioz avatar Jun 10 '20 14:06 fabioz

I am developing an application that runs inside docker, and while developing, you can set the command-line to pydevd --port 1234 --client 1.2.3.4 --file file.py options instead of just python file.py options so that you can get a debugger in your IDE. However, this does not pass the stdout and stderr to the server, so you have to get the output from the docker logs.

As a workaround I created a wrapper python script that calls pydevd.settrace with those options enabled.

retnikt avatar Jun 10 '20 14:06 retnikt