Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-32515: Add an option to trace to run module as a script #5134

Merged
merged 1 commit into from
Jun 1, 2019

Conversation

mariocj89
Copy link
Contributor

@mariocj89 mariocj89 commented Jan 7, 2018

Adds a new option in trace that allows tracing runnable modules.

If you find it appropriate I can add some further tests that verify things like:

  • that only the lines of the modules are covered
  • The args are passed properly

https://bugs.python.org/issue32515

Adds a new option in trace that allows tracing runnable modules. It is
exposed as `--module module_name` as `-m` is already in use for another
argument.
@mariocj89
Copy link
Contributor Author

@ncoghlan @pablogsal do you think it is worth getting this before the 3.8 cut on Monday? It is the last module missing for https://bugs.python.org/issue9325 🎉

I've pushed a small change I noticed, argv was being set as a tuple, not a list.

(So cool, I was debugging it as python.exe -m pdb --module -l trace -m my_test_package 😆 ).

@ncoghlan ncoghlan merged commit 354227a into python:master Jun 1, 2019
@ncoghlan
Copy link
Contributor

ncoghlan commented Jun 1, 2019

Thanks for the ping, and yep, sounds like a good idea to me :)

@mariocj89 mariocj89 deleted the trace_module branch September 14, 2019 11:26
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Adds a new option in trace that allows tracing runnable modules. It is
exposed as `--module module_name` as `-m` is already in use for another
argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants