Skip to content

Pylance features are not working when debugger is attached to file outside workspace #688

@Andrej730

Description

@Andrej730
  1. Save the snippet below, set breakpoint at bar() and then run it (not in debug mode).
  2. Attach debugger.
  3. Try to go to definition for bar or foo. ctrl-click is not working and go to definition is not present in context menu.
  4. If you hover over variable it says use 'Alt' to show editor language tooltip but it's not working.
    Image
  5. 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.

Snippet:

import debugpy


def foo():
    print("hello")


def bar():
    foo()


debugpy.listen(5678)
debugpy.wait_for_client()
bar()

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions