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

Debugger stops twice when hitting continue after stopping at a breakpoint #964

Closed
DonJayamanne opened this issue Jun 27, 2022 · 1 comment

Comments

@DonJayamanne
Copy link
Contributor

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: 1.6.0 (run import debugpy; print(debugpy.__version__) if uncertain)
  • OS and version: Mac
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.13 Virtual Env
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Debugger stops twice when hitting continue after stopping at a breakpoint

Expected behavior

Should continue instead of stopping at the same place again.

Steps to reproduce:

  1. Create a Jupyter notebook
  2. Add a cell with the code
print(1)
print(2)
print(3)
print(4)
  1. Add a breakpoint to the second & third lines
  2. Ensure focus is set to this cell.
  3. Start debugging using the command Debug Cell
    Notice how the debugger now stops at the second line as expected, now hit the Continue button, & note how the debugger stops again at the exact same line.
    Continue again & it will continue as expected to line 3, but continuing will stop in line 3 yet again.

Basically the debugger stops twice for every breakpoint.

@fabioz
Copy link
Collaborator

fabioz commented Jun 27, 2022

Hello @DonJayamanne,

I'm closing this issue because the issues related to Jupyter are being tracked at:
#869

In particular, the most clarifying comment about it is probably #869 (comment) (the real issue is that Jupyter doesn't really execute things as a single frame, rather it does an exec line by line and the debugger needs to understand this better to handle it appropriately).

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

No branches or pull requests

2 participants