You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a normal .py file when I right click a function declaration to use the "Find All References" feature, I expect it to show me all references across the entire project/workspace. But what I noticed is it that the results exclude my notebooks (.ipynb files). But if I my notebook is open in a tab, then it shows it as a result. Is this working as intended?
Environment data
VS Code version: Version: 1.88.0-insider
Jupyter Extension version (available under the Extensions sidebar): v2024.3.2024032701 (pre-release)
Python Extension version (available under the Extensions sidebar): v2024.3.10871011 (pre-release)
OS (Windows | Mac | Linux distro) and version: Mac
Python and/or Anaconda version: 3.12
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Jupyter server running: Local
Expected behaviour
Show references across all files in project, including notebook files
Actual behaviour
Always excludes notebook files unless open.
Steps to reproduce:
"Find all references" for a function (WITHOUT any notebook files are open in tabs)
1 result in 1 file
Now, if I open a notebook using that same function, and run the same Find all references, as you can see here, it shows 2 results.
The text was updated successfully, but these errors were encountered:
Thanks for the issue. This is known limitation and is discussed more in this item here: #5175
The root cause is we can't guess what the URI of a notebook cell is going to be as VS code generates that ID at runtime. So although we could look on disk for notebook references, we can't generate the correct URI so that when VS code opens the notebook it matches what we found.
The current thinking is we have to open all of the notebooks in memory inside of VS code in order to return references to them, but we haven't tried that tactic yet.
In a normal .py file when I right click a function declaration to use the "Find All References" feature, I expect it to show me all references across the entire project/workspace. But what I noticed is it that the results exclude my notebooks (.ipynb files). But if I my notebook is open in a tab, then it shows it as a result. Is this working as intended?
Environment data
Expected behaviour
Show references across all files in project, including notebook files
Actual behaviour
Always excludes notebook files unless open.
Steps to reproduce:
1 result in 1 file
![image](https://private-user-images.githubusercontent.com/670655/317861658-8abd9a32-d815-430e-9bfd-946a0e88ee46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNTExOTksIm5iZiI6MTcyMTI1MDg5OSwicGF0aCI6Ii82NzA2NTUvMzE3ODYxNjU4LThhYmQ5YTMyLWQ4MTUtNDMwZS05YmZkLTk0NmEwZTg4ZWU0Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxN1QyMTE0NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zMWE3OTdkNjQ3ZjExYWZiMmM1NTcxYjBjZjUzNDI2YjI0MWQxMmNkMDI0ZjYwYmQyNzBhYWEyOGZiMGQ3ZWE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.X4h2-V6dEONuiww6nMKbdGqnmWFI2WzbrhdQaS6wibg)
The text was updated successfully, but these errors were encountered: