Issue
I have my '.py' file, and I'm running its functions on the Python Interactive Window (the notebook-like feature of VSCODE). All the variables and functions are stored only in this Jupyter environment. They're not even accessible on the terminal.
Img that shows the variables on my Jupyter env
When I click "Debug Cell" (as you see on the img), it starts debugging using the Jupyter Environment, with all variables, but it doesn't stop on the breakpoints I've put. Like it doesn't get linked with VSCODE.
If I type F5 or click on "Run and Debug", it starts the Debug Session running the entire .py file, which is not what I want.
In this case, it can access the breakpoints, but not my variables.
I just want to debug a specific part of my code using the variables that I have already created. I must have been missing something really simple.
The only answer I can find on the internet is "you should create a launch.json file", but it doesn't fix my situation.
Does anyone know what I'm missing?
Solution
When I click "Debug Cell" in the python file, it executes the result in the "Interactive" window and can stay at the breakpoint I set, and I can also see the value of the variable executed in the code in the "Interactive" window :
Since the debugging function of python code and "Interactive" function are provided by the python extension, and the kernel function of Jupyter also depends on the Jupyter extension, please try to reinstall these two extensions and reload VS Code.
My environment:
VS Code: 1.53.1 (user setup)
python: 3.9.1
VS Code extensions: Python(2021.1.502429796); Jupyter(2020.12.414227052); Pylance(2021.2.2).
OS: Windows_NT x64 10.0.19041
Answered By - Jill Cheng
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.