Skip to content

bug in debugger mode with extensions ending with */io.py #707

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

Open
ms-cmy opened this issue May 5, 2025 · 1 comment
Open

bug in debugger mode with extensions ending with */io.py #707

ms-cmy opened this issue May 5, 2025 · 1 comment
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@ms-cmy
Copy link

ms-cmy commented May 5, 2025

Hello.

I've noticed in the recent version that, when trying to debug the following path:

├── my_package
│   ├── __init__.py
│   └── io.py

the breakpoints inside io won't work, and vscode won't even go into the file (in debug mode).

how to reproduce:

create a folder named "my_package" (just like it's in the tree shown earlier)
also add init.py (so we can import it)
inside io.py we can write some really simple code:

def custom_function():
    x=1
    return "hello"

now at the same dir as "my_package"

create a file (to import the package) run.py with the following:

from my_package.io import custom_function

custom_function()

add a breakpoint at custom_function run the debugger (F5 if using defaults), the expected course is that if we press F11 (go into) it will jump to io.py file at x=1. Here it just entirely skips the io.py file.

its easy to check what we expected by just changing the name of "io.py" to anything (by default vscode will rename the python imports at our run.py, if not, just rename from my_package.io -> my_package.renamed)

rerun in debug mode (F5)

with this, we can find the "custom_function" in debugger mode.

i've tested this both in linux (mint) and windows (win12), both had the latest version for vscode.

If it's necessary to add more description for this problem is necessary, please let me know.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 5, 2025
@lscheilling
Copy link

lscheilling commented May 24, 2025

I've got the same issue with my project too, downgrading debugpy to 2024.10.0 seems to work for now, somewhat similar to #617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants