Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code Python: How to stop live reloading?

It's super annoying and I can't figure out how to turn it off. It worked nicely until the last 2 updates of VS Code. Now it's a nightmare because every time when I change the code and it's still working it tries to reload live, then throws some exception. I can't get rid of it.

I tried to add "--no-reload" into launch.json but then VS Code refuses to launch the project because it shows error "unknown argument" or so.

I'm using Flask and the exception is always thrown in werkzeug:

enter image description here

My launch.json:

    "configurations": [
        {
            "name": "Python: Flask",
            "type": "python",
            "request": "launch",
            "module": "flask",
            "autoReload": {"enable": false},
            "env": {
                "FLASK_APP": "application.py",
                "FLASK_ENV": "development"
            },
            "args": [
                "run",
                "--no-debugger"
            ],
            "jinja": true,
            "justMyCode": false
        }
like image 211
mimic Avatar asked Jun 22 '26 23:06

mimic


1 Answers

Check out this devblog from Microsoft announcing this change. But essentially you need to add/edit the following in launch.json:

"autoReload": {"enable": false}
like image 183
pavel Avatar answered Jun 24 '26 14:06

pavel