I've came across this msg today when running tests...
# general
p
I've came across this msg today when running tests with
--debug
option:
Copy code
IntrinsicError: Only local environments support running processes interactively, but a docker environment was used.
We run our tests in ubuntu-based docker container using pants environments feature (we have some os-related dependencies we need at runtime, and also part of our team does development on Mac). What are my options to debug any tests using pants in that case? Has anyone worked around this or created some plugin for it?
Before pants, we were just doing
docker run -it /bin/bash
with our code mounted to the container, and then running pytest manually on single test, with pdb debugger or something more advanced if needed.
But it would be ideal to run using pants in all cases...
b
That does seem like a somewhat artificial limitation: pants could definitely be starting a container for interactive use! https://github.com/pantsbuild/pants/issues/17182 covers it, but there doesn’t seem to be a suggestion of a short term workaround, other than “implement it” 🙃
p
I understand, thanks for pointing me to that ticket @broad-processor-92400