Allow pausing while running #42

Closed
cool-RR opened this Issue Jul 21, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@cool-RR

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

This comment has been minimized.

Show comment Hide comment
@inducer

inducer Jul 22, 2012

Owner

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.

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

This comment has been minimized.

Show comment Hide comment
@cool-RR

cool-RR 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.

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

This comment has been minimized.

Show comment Hide comment
@asmeurer

asmeurer Mar 12, 2013

Collaborator

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

Collaborator

asmeurer commented Mar 12, 2013

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

@asmeurer

This comment has been minimized.

Show comment Hide comment
@asmeurer

asmeurer Mar 12, 2013

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.

Collaborator

asmeurer commented Mar 12, 2013

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

Fix up some more of the interrupt framework
This (partially) fixes #42, and also improves work on #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

This comment has been minimized.

Show comment Hide comment
@asmeurer

asmeurer Mar 12, 2013

Collaborator

See #63 for work on this.

Collaborator

asmeurer commented Mar 12, 2013

See #63 for work on this.

asmeurer added a commit to asmeurer/PuDB that referenced this issue Mar 12, 2013

Fix up some more of the interrupt framework
This (partially) fixes #31, and also improves work on #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 asmeurer closed this in 8911613 Mar 12, 2013

asmeurer added a commit that referenced this issue Mar 12, 2013

Merge pull request #63 from asmeurer/signals
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