Zanam
Zanam

Reputation: 4807

VS Code highlight line and run in debug mode

I have been using PyCharm and have started using Visual Studio Code for Python.

In PyCharm during debug, I can highlight a line and run it using the Ctrl + Shift + r.

This is what I see in settings but when I do Shift + Enter it takes me to the terminal where it says variable not defined.

Python select line in Python terminal is set to Shift + Enter.

Upvotes: 0

Views: 883

Answers (1)

Steven-MSFT
Steven-MSFT

Reputation: 8431

Solution:

Open the DEBUG CONSOLE panel, then copy the code you want to run in the input box, with Enter to execute it.

Reason:

In the PyCharm, the code was sent to the Debug console, while not the Python Console console. But it's not available in the VSCode.

Upvotes: 0

Related Questions