Description
In the Pants project we're facing an issue where we can't set breakpoints on files when running some code, and it boils down to the remoteRoot
being CWD but code is running in a tempr sandbox.
To give an overview of the workflow here:
- User tells pants to run their code and launch a debug server
- Pants creates a sandbox in
/tmp/...
with all the code laid out - Pants launches the debug server (using
debugpy
) and waits for connection- CWD of the process is the user's code root
- User connects but since the remote root is configured as
"."
which isn't the tempdir breakpoints relative to the code root aren't loaded
You could say "OK, the user should be setting the pathMapping
", which would be annoying at the least, but is ultimately impossible as the sandboxes (the tempdir) is ephemeral, fresh, and distinct per run.
I suspect what I really want is to allow the server to (somehow) specify it's "root" when being invoked (which in this case would be the sandbox tempdir)