Skip to content

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

@ms-cmy

Description

@ms-cmy

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingduplicateThis issue or pull request already exists

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions