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

Code navigation to third party libraries does not work in the Jupyter notebooks. #867

Closed
subhashbylaiah opened this issue Jul 14, 2020 · 9 comments
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language verified Verification succeeded
Milestone

Comments

@subhashbylaiah
Copy link

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Open a notebook (.ipynb file) or create one with some test code (just define a variable and access it from a subsequent cell)

  2. ⌘+Click should take you to the variable/function definition and this does not happen.

Actual behavior

  1. ⌘+Click does nothing (although the same works in .py files)

Expected behavior

  1. ⌘+Click should take you to the variable/function definition and this does not happen.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • VS Code version: 1.46.1
  • Setting python.languageServer: Jedi
  • Python and/or Anaconda version: 3.6.10
  • OS: Mac
  • Virtual environment: conda

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

@IanMatthewHuff
Copy link
Member

@subhashbylaiah . Thanks for the report on this. As it currently is implemented notebook support is added in as an independent webview, we've tried to make it match the VSCode editors as much as we can, but many code navigation and extension features are currently not supported in it.

The good news is that the VSCode core team is currently in process of adding in full notebook UI support to the main VSCode product. When this comes online, our extension will move over to using that and this issue should be resolved. You can track the main VSCode issue here:
microsoft/vscode#91987

@IanMatthewHuff
Copy link
Member

I'm going to close this issue for now as we will not be fixing it in our current implementation, but the new notebook implementation should be releasing soon in preview form soonish, and you can check out this feature when that happens.

@subhashbylaiah
Copy link
Author

Ok, thanks

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 11, 2020
@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Nov 11, 2020
@roma-glushko
Copy link

Hey @IanMatthewHuff 👋
wondering if a new implementation was released. I have the same issue with go to definition functionality

@IanMatthewHuff
Copy link
Member

@roma-glushko It's coming along, but in Preview form now. If you download VS Code - Insiders (it's totally SxS safe with regular stable VS Code) then the new UI implementation is the default there. Check it out and see if it works there for you.

@roma-glushko
Copy link

@IanMatthewHuff wow new look and feel of Jypiter integration is fantastic 💫 So much better than PyCharm integration 💪

I do see go to definition features but they seem to apply to local notebook variables only. Is it possible to navigate code imported from 3rd-party libs and modules just like it's possible to do from regular python script file?

2020-12-18_10-15-32 (2)

@IanMatthewHuff
Copy link
Member

@roma-glushko Hmm, I thought that would have been working. I'll reopen this issue and we can check.

@greazer greazer changed the title Code navigation does not work in the Jupyter notebooks. Code navigation to third party libraries does not work in the Jupyter notebooks. Jan 5, 2021
@greazer greazer added the notebook-intellisense Intellisense & other language features in notebook cells for any language label Aug 8, 2021
@greazer greazer added this to the October 2021 milestone Oct 10, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Oct 15, 2021

This should be working now on our latest insiders (and with latest Pylance insiders). Pylance actually provides goto definition.

@rchiodo rchiodo closed this as completed Oct 15, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Oct 15, 2021

Verification steps:

Add sklearn to an environment
Add this code to a cell

from sklearn.preprocessing import LabelEncoder

Right click on LabelEncoder and click goto definition.

@greazer greazer added the verified Verification succeeded label Oct 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants