Separate the debug-launching into a preparation phase and launching phase. The preparation phase is responsible for transforming the application command-line into a debuggable launch command-line; the launching phase then invokes the resulting command-line. If the preparation phase fails, then the python launcher just invokes the original application command-line.
This PR makes a few additional changes to better support this separation:
It treats failure to determine Python version as a preparation error: if the binary doesn't support -V to report the python version, such as uwsgi, then it's unlikely to support other debug options.
It propagates the exit code back to the container
It also adds some doc comments to describe the environment variables that allow tweaking behaviour.
Fixes #81
Separate the debug-launching into a preparation phase and launching phase. The preparation phase is responsible for transforming the application command-line into a debuggable launch command-line; the launching phase then invokes the resulting command-line. If the preparation phase fails, then the python launcher just invokes the original application command-line.
This PR makes a few additional changes to better support this separation:
-V
to report the python version, such asuwsgi
, then it's unlikely to support other debug options.It also adds some doc comments to describe the environment variables that allow tweaking behaviour.
cc: @peterlin741, @j-windsor