VSCode: Code Lens For Jupyter Notebook Does Not Show Debug Option Or "run Code By Line"
Solution 1:
"Run code by line" has not yet been implemented for the new notebooks interface that you are seeing. In the meantime, you can opt back into the old interface with "Run code by line" support by doing the following:
- Open your user settings.json by typing Ctrl+Shift+P > "Preferences: Open Settings (JSON)"
- Add the following line to your user settings.json file:
"jupyter.experiments.optOutFrom": ["NativeNotebookEditor"]
- If the
workbench.editorAssociations
setting is present in your settings.json file, delete it. - Reload VS Code for the new settings to take effect
Solution 2:
In vscode 1.59 (see https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_59.md#jupyter-run-by-line)
Jupyter "Run By Line"
We've been working on supporting the "Run By Line" feature in Jupyter notebooks. This feature is essentially a simplified debug mode that lets you step through your cell's code line by line without any complex debug UI. This is still experimental, but you can try it out by setting
"jupyter.experimental.debugging": true
, installing version 6 of ipykernel in your selected kernel, then clicking the "Run By Line" button in the cell toolbar.
"jupyter.experimental.debugging": true
Of interest
We have been working on supporting debugging in Jupyter notebooks, so that you can set breakpoints in notebook cells, execute cells step-by-step, and use all other VS Code debugger features. This is experimental, but you can try it out by setting
"jupyter.experimental.debugging": true
, installing version 6 of ipykernel in your selected kernel, then clicking the "Debug" button in the notebook toolbar.
in vscode v.158, https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_58.md#jupyter-notebook-debugging
Solution 3:
Make a debug point and just press F10 ; Debug will started automatically
Post a Comment for "VSCode: Code Lens For Jupyter Notebook Does Not Show Debug Option Or "run Code By Line""