Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change code while debugging python program in Visual Studio Code

Is it possible to change the code while debugging in VSCode and that the change will take effect immediately without rerun the code? I'm using Microsoft Python extension.

like image 922
Adirmola Avatar asked Mar 19 '19 14:03

Adirmola


People also ask

How do I change the Python code in Visual Studio?

To do so, open the Command Palette (Ctrl+Shift+P) and enter Preferences: Open User Settings. Then set python.defaultInterpreterPath , which is in the Python extension section of User Settings, with the appropriate interpreter.

How do I debug a Python code using Visual Studio code?

If you're only interested in debugging a Python script, the simplest way is to select the down-arrow next to the run button on the editor and select Debug Python File in Terminal.

Can you edit python in Visual Studio?

Visual Studio provides a first-class Python editor, including syntax coloring, autocomplete across all your code and libraries, code formatting, signature help, refactoring, linting, and type hints.


1 Answers

So, apparently that the closest way of doing it is to use Jupyter capabilities (that can be use via VSCode).

With Jupyter you can split your code to multiple cells and run every each one of them separately without run all from beginning.

like image 103
Adirmola Avatar answered Oct 15 '22 09:10

Adirmola