question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Go to definition does not work for Pandas and other libraries

See original GitHub issue

Issue Type: Bug

Go To Definition does not work for Pandas and any other source type. For example, in this very simple code snippet, i try to CMD+click on a DataFrame symbol and as a seasoned engineer, i expect to go directly to sources of DataFrame class definition, because i have no time to google for documentation nor i generally trust it, because it’s either not that extensive or out of date. And sources have more things to show.

import pandas as pd
pd.DataFrame([{'foo': 1, 'bar': 2}])

navigation does not work also for any module in the sys.path:

import os,sys
# (i have all my exploratory notebooks in `notebooks` folder and my other code in packages up the level)
sys.path.append(os.path.abspath('..'))

this does not work for symbols defined in the same notebook as well:

e.g. def foo(): print(1) in one cell, and foo() in the other cell doesn’t get me jumping the way i’d expect from an IDE.

Extension version: 2021.3.600686576 VS Code version: Code - Insiders 1.54.0-insider (Universal) (e590188f17162393f50feec19263398e6fe02d13, 2021-02-26T20:39:12.763Z) OS version: Darwin x64 19.6.0

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30263608
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30244315
pythonvsdeb440:30224570
pythonvsded773:30223139
pythonvspyt875:30259475
pythonvspyt639:30264824
pythontb:30258533

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nfxcommented, Apr 3, 2021

yes! it works! thanks!

1reaction
IanMatthewHuffcommented, Mar 11, 2021

@nfx. While digging in on this I found a straight up bug here. Basically outgoing links (goto def and whatnot) from inside a notebook file to anything outside a notebook file were not working. I have a fix in progress and should hit the insiders build of the Python extension soonish. Just follow this issue and you should see when it gets closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Go to Definition in Python Microsoft Extension is not working in ...
1 Answer 1 · Type >Python: Show output in vscode console · Restart vscode and open any python file · In the output...
Read more >
Python + VSCode: “Go to Definition” Doesn't Work?
In fact, my situation is slightly different. I am using VScode to connect to a remote Linux computer. Some extensions are installed on...
Read more >
Contributing to the code base — pandas 1.5.2 documentation
All methods using an optional dependency should include a test asserting that an ImportError is raised when the optional dependency is not found....
Read more >
Install External Libraries and Kernels in Notebook Instances
The different Jupyter kernels in Amazon SageMaker notebook instances are ... SageMaker does not update these libraries when you stop and restart the ......
Read more >
The Python Standard Library — Python 3.11.1 documentation
Python's standard library is very extensive, offering a wide range of ... written in Python that provide standardized solutions for many problems that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found