https://pantsbuild.org/ logo
#general
Title
# general
c

calm-alarm-89082

10/04/2020, 12:57 PM
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

hundreds-father-404

10/04/2020, 4:09 PM
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

calm-alarm-89082

10/04/2020, 6:59 PM
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

hundreds-father-404

10/04/2020, 7:40 PM
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

happy-kitchen-89482

10/05/2020, 8:58 PM
Should probably add a documentation page on this
h

hundreds-father-404

10/05/2020, 9:01 PM
Page on what in particular?
h

happy-kitchen-89482

10/05/2020, 10:42 PM
On how to debug into a test
h

hundreds-father-404

10/05/2020, 10:48 PM
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

happy-kitchen-89482

10/06/2020, 12:46 AM
Ah excellent