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 pausing while running #42

Closed
cool-RR opened this issue Jul 21, 2012 · 5 comments · Fixed by #63
Closed

Allow pausing while running #42

cool-RR opened this issue Jul 21, 2012 · 5 comments · Fixed by #63

Comments

@cool-RR
Copy link
Contributor

cool-RR commented Jul 21, 2012

Sometimes I'll be running a program, and then it stalls so bad and I have no idea why.

In my main debugger, I'm able to pause execution by pressing Shift-F5. Then I can see which line the program is stuck on. A similar feature in pudb would help.

@inducer
Copy link
Owner

inducer commented Jul 22, 2012

Ctrl-C should get you into the debugger. You can't resume execution from there, unfortunately, but I don't quite know how to fix that.

@cool-RR
Copy link
Contributor Author

cool-RR commented Jul 22, 2012

Okay, that's a workaround that could be useful sometimes. Let's just leave this issue around until someone knows how to fix it.

@asmeurer
Copy link
Collaborator

My trick from #31 (comment) let's you do exactly this. So solving #31 would make solving this issue easy.

@asmeurer
Copy link
Collaborator

OK, as expected, this is trivial to implement. See #63. It doesn't work with set_trace() yet (only starting the script with pudb script.py), but implementing that should be easy as well. I just need to figure out the correct place to put the code.

asmeurer added a commit to asmeurer/PuDB that referenced this issue Mar 12, 2013
This (partially) fixes inducer#42, and also improves work on inducer#31.

Now, interrupting with Control-C works when the debugging is started with
set_trace().

The SIGINT handler is enabled via the public function
pudb.set_interrupt_handler.  If you want to be able to enter PuDB from within
your application, just call this function.  By default, it uses SIGINT (i.e.,
Control-C), but you can change it to use a different signal if that one
interferes.

There is still one major issue, which is that when you break in the middle of
an atomic operation, it goes to bdb. After pressing `n` several times you get
to your code, though.
@asmeurer
Copy link
Collaborator

See #63 for work on this.

asmeurer added a commit to asmeurer/PuDB that referenced this issue Mar 12, 2013
This (partially) fixes inducer#31, and also improves work on inducer#42.

Now, interrupting with Control-C works when the debugging is started with
set_trace().

The SIGINT handler is enabled via the public function
pudb.set_interrupt_handler.  If you want to be able to enter PuDB from within
your application, just call this function.  By default, it uses SIGINT (i.e.,
Control-C), but you can change it to use a different signal if that one
interferes.

There is still one major issue, which is that when you break in the middle of
an atomic operation, it goes to bdb. After pressing `n` several times you get
to your code, though.
asmeurer added a commit that referenced this issue Mar 12, 2013
Start fixing issue #42 and hopefully #31.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants