Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There is a way to change the code while debugging in python using vscode? [duplicate]

I know that some languages, like .NET (I have some experience doing this on Visual Studio), there is a way to stop the execution on a break points and change the nexts lines of code, change value of variables or even change the execution line without reloading the application.

This is pretty usefull, since you can write your code while it's executing, specilly for non linear codes, where some functions are called in events, like django or flask aplications.

I would like to know if there is a way (if possible using vscode) to do the same in python.

like image 466
Eric Gomes Avatar asked Aug 09 '26 13:08

Eric Gomes


1 Answers

Yes, you need to add this in the launch.json file:

"autoReload": {
    "enable": true
}

You can refer to the official docs for more information.

like image 113
Steven-MSFT Avatar answered Aug 12 '26 05:08

Steven-MSFT