Replies: 1 comment 4 replies
-
I think there's potentially two other ways to do this:
1 is more structured/reusable, whereas 2 may be simpler/faster for one-off things. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have some Python tests (typically run with
pants test ...
) that I sometimes would like to run under a profiler such aspyinstrument
, orcProfile
, and some other times even under a C/C++ debugger likegdb
in order to break into problematic logic in a given extension module.What is the simplest way to do so?
What I am doing at the moment:
BUILD.pants
file to add apex_binary
rule for thepython_test
rule that I want to instrument/debugif __name__ == "__main__"
pants package
for thepex_binary
targetgdb --args python ./dist/path/to/target.pex
now seems to workBeta Was this translation helpful? Give feedback.
All reactions