Is it possible to use the `--debug-adapter` when r...
# general
t
Is it possible to use the
--debug-adapter
when running the target in a
docker_environment
?
b
If the correct port is open, it actually might work. I never tested it 🤔
t
b
Ah, well then that solves that 😅 Feel free to file an issue with detailed info if one doesn't already exist.
Others can chime in on whether that's feasible and if its safe to do so
t
And what about running the Dockerfile with debug-adapter, e.g.
./pants run --debug-adapter src/Dockerfile
? Where the Dockerfile uses a PEX
b
Wouldn't work, The DAP is ecosystem-specific. In this case if you're running the dockerfile it'd be equivalent to asking for a Docker-based DAP-application.
You could easily instrument your code to import
debugpy
and call the relevant function (i forget the name,
wait_for_connection
or something). That's what we did pre-
--debug-adapter
)
t
Yes I am aware of that. Thank you for the explanation!
🙌 1
b
Of course ❤️
😊 1