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

Allow debugging without disabling output capturing #101

Closed
darrenburns opened this issue Jan 27, 2020 · 4 comments
Closed

Allow debugging without disabling output capturing #101

darrenburns opened this issue Jan 27, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed idea/discussion question Further information is requested

Comments

@darrenburns
Copy link
Owner

Is there a way we can disable output capturing when a debugger runs automatically?

@darrenburns darrenburns added enhancement New feature or request help wanted Extra attention is needed question Further information is requested idea/discussion labels Jan 27, 2020
@darrenburns darrenburns changed the title Allow debugging without enabling output capturing Allow debugging without disabling output capturing Jan 27, 2020
@CodeMouse92
Copy link
Contributor

CodeMouse92 commented Jan 28, 2020

I wonder if the default should be to pipe the output by default; capture, process, and then spit it out again in some formatted fashion?

@breuleux
Copy link

The behavior of breakpoint() (Python >= 3.7) can be controlled with the PYTHONBREAKPOINT environment variable, and I believe you can modify it programmatically by setting it in os.environ.

It wouldn't work for e.g. explicit calls to pdb.set_trace(), but that's falling out of usage as people move to 3.7 and 3.8, so I think it could be a reasonable start to wrap breakpoint so that it turns off capture when invoked and turns it back on when execution is resumed.

@darrenburns
Copy link
Owner Author

That sounds like a reasonable approach. For 3.6 users we could just provide a ward.breakpoint() function that wraps pdb.set_trace(), and can be called directly.

@darrenburns
Copy link
Owner Author

Made a start on this a while back: #119

Repository owner locked and limited conversation to collaborators Mar 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed idea/discussion question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants