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

pdb-like debugging workflow? #69

Open
gabriel-v opened this issue Feb 7, 2023 · 1 comment
Open

pdb-like debugging workflow? #69

gabriel-v opened this issue Feb 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@gabriel-v
Copy link

gabriel-v commented Feb 7, 2023

I get it that pdb doesn't work in browsers because we don't have subprocess and we apparently need it. We also don't have stdin, which I think is used for the pdb REPL.

But I can't figure out how to obtain a debugger workflow where I can python shell myself in the middle of anything, anywhere.

Somebody, somewhere, worked around this - maybe we can field some quick hack in the pythonrc to get some kind of debugger shell / breakpoint REPL?

@pmp-p
Copy link
Member

pmp-p commented Feb 8, 2023

Actually you can have function tracing and REPL all the time. i use tracing to detect infinite loop when porting code. REPL is not so usefull while running a game.

pdb style break could work in async functions ( spinlock + yield ) allowing variable inspection. That would be more interesting for REPL use and not very hard to use when code reloading is implemented.

breaking in non async is not always possible on worker-less cpython ( afaik only WaPy can do that on main thread) so it's not worth the work since in the future python code will get more and more compiled to wasm ( mypyc ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants