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.

Autocompletion of session variables and suggestion in vscode-Jupyter

See original GitHub issue

Describe the bug I have run R scripts in vscode-Jupyter for some time. Recently after upgrading the extensions, there is somthing wrong with it. The autocompletion suggestions and the names of variables defined previously disappear in .ipynb files even though the appropriate IRkernel have been installed in Jupyter. But it still works well in .R files.

To Reproduce Steps to reproduce the behavior:

  1. Create a .ipynb/.R file
  2. Type some R scripts such as a <- c(1, 2)
  3. Start new line with a - in the .R file you’ll see variable suggestions, in .ipynb you won’t.

Setting.json


"r.rterm.windows": "C:\\Users\\myusername\\anaconda3\\Scripts\\radian.exe",
"r.rpath.windows": "C:\\Program Files\\R\\R-4.1.3\\bin\\x64\\R.exe"
"r.bracketedPaste": true,
"r.sessionWatcher": true

Screenshot

Autocompletion doesn’t see the session variables and suggestions in .ipynb:
But autocompletion works in .R:
The log of Extension Host:

Environment:

  • OS: Windows 10 x64 (build 22000)
  • VSCode Version: 1.66.1
  • R Version: 4.1.3 (2022-03-10)
  • vscode-R version: v2.4.0
  • vscode-Jupyter version: v2022.3.1000901801

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
pehkawncommented, Apr 27, 2022

I’m been having this issue for some time. Have there been any new developments?

1reaction
renkun-kencommented, Apr 13, 2022

Thanks for confirming it worked in older vscode versions. Looks like I need to change something in the language client or server to adapt to the latest changes in notebooks api which is broken in this case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get autocomplete and suggestions in Jupyter ...
I'm trying to code on Jupyter Notebook on VS Code, but there are no code suggestions nor syntax highlighting!
Read more >
Working with Jupyter Notebooks in Visual Studio Code
Create, open, and save Jupyter Notebooks; Work with Jupyter code cells; View, inspect, and filter variables using the Variable Explorer and Data Viewer ......
Read more >
The Only Auto-Completion Extension You'll Ever Need For ...
The Only Auto-Completion Extension You'll Ever Need For Your Jupyter Notebooks. This is the one I recommend using. Explore just a few simple ......
Read more >
How to Get the Best Autocomplete in Jupyter Notebooks and ...
To enable code autocomplete in Jupyter Notebook or JupyterLab, you just need to hit the Tab key while writing code. Jupyter will suggest...
Read more >
Set Visual Studio code for OpenCV python | MLearning.ai
When you Python Extension, by default to other Extension are installed as well, Pylance and Jupyter, Pylance provide python code IntelliSense experience with ......
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