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

Latest IPython (8.1.0) doesn't support stepInto correctly with 1.5.1 #854

Closed
rchiodo opened this issue Feb 25, 2022 · 9 comments
Closed
Assignees

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Feb 25, 2022

Environment data

  • debugpy version: 1.5.1
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10
  • Using VS Code or Visual Studio: VS code

Actual behavior

Create a notebook with cell with a number of lines:

image

Put a breakpoint on the first line
Debug the cell
Step into

Step into gets stuck on the first line.

Run by line (another way we support debugging)
image
also behaves strangely. It can't step through the function.

Expected behavior

Stepping works

@fabioz I believe this was caused by your recent change to IPython? Do we need a newer version of Debugpy to handle that change?

@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 25, 2022

Seems like if there's a breakpoint on the first line, every step into will alternate between that line and the actual line to step into.

@int19h
Copy link
Contributor

int19h commented Feb 25, 2022

It sounds like #851 was the fix for this?

@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 25, 2022

I don't think so? At least I cloned debugpy and copied it into my site packages. I'm still getting the problem.

@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 25, 2022

Maybe that didn't work. It looks like I don't have the latest changes for some reason.

@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 25, 2022

No even with the latest changes, still repros.

@fabioz
Copy link
Collaborator

fabioz commented Feb 26, 2022

No even with the latest changes, still repros.

This happens because in Python 3.10 there is always a line event at line 1 and Python itself is making that line event due to the way it's compiled now.

It seems my fix wasn't complete then... This will need another fix in IPython so that besides the new co_name the co_lnotab is also redone so that this spurious line event isn't done.

fabioz added a commit to fabioz/debugpy that referenced this issue Feb 26, 2022
@fabioz
Copy link
Collaborator

fabioz commented Feb 26, 2022

Actually, this didn't need a change in IPython again (the debugger already had something to ignore spurious lines like this for <module>, so, I've extended it to handle the new <cell pattern for co_name in IPython).

fabioz added a commit to fabioz/debugpy that referenced this issue Feb 26, 2022
fabioz added a commit to fabioz/debugpy that referenced this issue Feb 26, 2022
fabioz added a commit to fabioz/debugpy that referenced this issue Feb 26, 2022
@fabioz fabioz closed this as completed in c5edec7 Feb 28, 2022
@rchiodo
Copy link
Contributor Author

rchiodo commented Mar 22, 2022

@fabioz do you know when debugpy might issue a new release? Otherwise debugging is broken in VS code with 1.5.1.

@int19h
Copy link
Contributor

int19h commented Mar 22, 2022

We'll do a release this week.

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

3 participants