You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Save the snippet below, set breakpoint at bar() and then run it (not in debug mode).
Attach debugger.
Try to go to definition for bar or foo. ctrl-click is not working and go to definition is not present in context menu.
If you hover over variable it says use 'Alt' to show editor language tooltip but it's not working.
Syntax highlight itself looks weirdly - apparently the problem is that symbols are not recognizes as such and modules / methods / functions appear just as white, making it harder to read.
Andrej730
changed the title
Go to definition, editor language tooltips (and other code navigation features) are not working when debugger is attached
Pylance features are not working when debugger is attached to file outside workspace
Apr 19, 2025
I was able to narrow it down further - the issue occurs when python file you attach to is outside the current workspace (justMyCode setting is disabled, so it shoudn't get in the way).
In my case I have a main repository I'm working on (e.g. C:\repo\xxx) and for the development I need to see the changes live as part of another software yyy.
To achieve it, I've symlinked C:\yyy\xxx to C:\repo\xxx. But since I use C:\yyy\main.py to start the program, then from debugger's POV it appears like I'm working with the files outside of my workspace (C:\yyy\xxx), which leads me to this issue.
bar()
and then run it (not in debug mode).bar
orfoo
. ctrl-click is not working and go to definition is not present in context menu.Snippet:
Issue demo:
Code_-_Insiders_4bX4iRJKcA.mp4
Expected result (for it to work in similar way to starting debug mode from editor):
Code_-_Insiders_y5fA2ARhqm.mp4
The text was updated successfully, but these errors were encountered: