PyDev.Debugger
PyDev.Debugger copied to clipboard
Enable stdout-to-server and stderr-to-server from command-line
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.
What's the use case for running it directly on the command line and customizing that flag?
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.