Skip to content

Go to Definition is not working. #8594

Description

@linette-zyy

Environment
Build of Visual Studio: 18.10.0 Canary [12024.283.main]
Build of Python Package: 18.0.26207.1
Version of Pylance: 2026.2.109
OS version: Windows 11 Enterprise, version 25H2

Steps to Reproduce

  1. Create a new python application
  2. Input some codes
from math import cos, radians
	
# Create a string with spaces proportional to a cosine of x in degrees
def make_dot_string(x):
	rad = radians(x)                             # cos works with radians
	numspaces = int(20 * cos(radians(x)) + 20)   # scale to 0-40 spaces
	st = ' ' * numspaces + 'o'                   # place 'o' after the spaces
	return st
	
def main():
	for i in range(0, 1800, 12):
		s = make_dot_string(i)
		print(s)
	
main()
  1. Right click ‘make_dot_string’, choose go to definition.

Expected behavior
It should jump to the definition.

Additional context and screenshots
No response after click go to definition.

Image **Sample Code**

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions