Hi, we are now using pants (1.30.0) for many proje...
# general
c
Hi, we are now using pants (1.30.0) for many projects in our monorepo 🎉 one thing that we are to figure out is how to use breakpoints set using the IDE (pycharm or vscode). Did anybody find a way to do this? (I usually use pdb)
❤️ 1
h
Excellent! Glad to hear Do you mean breakpoints when running tests in particular? And to set this via your IDE? Are you using the v1 or v2 backend for Python?
c
yes, the main use case is when running tests, but they are useful also when running the app. we are using v2 backend (except for mypy)
❤️ 1
h
You can use
test --debug
, which will run the tests interactively in the foreground. https://www.pantsbuild.org/v1.30/docs/python-test-goal#running-tests-interactively
For MyPy, we added v2 support in 2.0. Check out https://www.pantsbuild.org/docs/how-to-upgrade-pants-2-0 for a migration guide. Now that you’re already using 1.30 and v2, it won’t be as much of a leap.
h
Should probably add a documentation page on this
h
Page on what in particular?
h
On how to debug into a test
h
I’m confused on what you’re suggesting. We do have a section on the
test
page about that already: https://www.pantsbuild.org/v1.30/docs/python-test-goal#running-tests-interactively And it shows a code example of using
pdb
h
Ah excellent