Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go To Definition does not work inside python REPL #23509

Open
bhavyaus opened this issue May 28, 2024 · 2 comments
Open

Go To Definition does not work inside python REPL #23509

bhavyaus opened this issue May 28, 2024 · 2 comments
Assignees
Labels
area-repl feature-request Request for new features or functionality needs spike Label for issues that need investigation before they can be worked on.

Comments

@bhavyaus
Copy link

Testing #23484

Steps:

  1. Create a python file and include the below sample code:
def is_prime(n):
    """Check if a number is prime."""
    if n <= 1:
        return False
    if n <= 3:
        return True
    if n % 2 == 0 or n % 3 == 0:
        return False
    i = 5
    while i * i <= n:
        if n % i == 0 or n % (i + 2) == 0:
            return False
        i += 6
    return True

def generate_primes(limit):
    """Generate a list of prime numbers up to a given limit."""
    primes = []
    for num in range(limit):
        if is_prime(num):
            primes.append(num)
    return primes

limit = 100
primes = generate_primes(limit)
print(f"Prime numbers up to {limit}: {primes}")
print('Hellp World!')

  1. Select the entire contents of the file and run in Python REPL
  2. In the Python REPL cell, right click on generate_primes(limit) and use Go To Definition command.
  3. Expected cursor to jump to the generate_primes definition but the operation results in a no-op
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 28, 2024
@anthonykim1
Copy link

Just gave this a try with both Python REPL and Interactive Window but I dont think Go To Definition works on either.
/cc @amunger Should I transfer this to Pylance or Jupyter?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jun 25, 2024
@amunger
Copy link

amunger commented Jun 25, 2024

This might be fixed once we switch to a notebook model with microsoft/vscode#154983.
Either way, probably not worth actually fixing until that is done since it would probably change what is needed.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jun 25, 2024
@anthonykim1 anthonykim1 added feature-request Request for new features or functionality area-repl and removed triage-needed Needs assignment to the proper sub-team labels Dec 9, 2024
@anthonykim1 anthonykim1 added the needs spike Label for issues that need investigation before they can be worked on. label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-repl feature-request Request for new features or functionality needs spike Label for issues that need investigation before they can be worked on.
Projects
None yet
Development

No branches or pull requests

3 participants