Eric Gomes
Eric Gomes

Reputation: 63

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

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.

Upvotes: 6

Views: 1267

Answers (1)

Steven-MSFT
Steven-MSFT

Reputation: 8411

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

"autoReload": {
    "enable": true
}

You can refer to the official docs for more information.

Upvotes: 4

Related Questions