No definitions found ever
See original GitHub issueIssue Type: Bug
To reproduce:
-
Create a file with the following contents:
foo = 'foo' print(foo)
-
Focus
foo
in the second line -
Press F12
Actual behaviour: VS Code prints “No definition found for ‘foo’” and does nothing else.
Expected behaviour: The focus should change to the start of line 1.
I’ve tested this both by opening a file and by creating a file in an existing workspace. I’ve tried on references to variables, functions, classes and methods. All of them fail, even when the definition is on the previous line and the extension even highlights the definition and focussed reference correctly.
Extension version: 2018.7.1 VS Code version: Code 1.26.0 (4e9361845dc28659923a300945f84731393e210d, 2018-08-13T16:25:59.521Z) OS version: Linux x64 4.17.14-arch1-1-ARCH Python version: CPython 3.6.5 Type of virtual environment used: Pipenv Relevant/affected Python packages and their versions: N/A
There was no VS Code output whatsoever while testing this. However, in the development console I get this message:
Python Extension: sendCommand jediProxy, Error (sendCommand) This socket is closed
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-7500U CPU @ 2.70GHz (4 x 3485) |
GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: disabled_software video_decode: unavailable_software video_encode: unavailable_software webgl: enabled webgl2: enabled |
Load (avg) | 3, 4, 3 |
Memory (System) | 15.31GB (5.17GB free) |
Process Argv | /opt/visual-studio-code/code |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top GitHub Comments
Apparently this isn’t part of the Python extension by default. My bad.
"python.jediEnabled": true
improves things ever so slightly, by finding definitions for variables (and only variables, it seems).You’re right, this seems to be related to the interpreter. I’ll just close this issue in favour of the others. And for anyone with similar problems, set
"python.jediEnabled": true
and click “Later” every time you get the “IntelliCode Python support requires you to use the Microsoft Python Language Server (preview).” prompt.