Debug a Flask (Python) web application in Visual Studio Code

后端 未结 8 1912
失恋的感觉
失恋的感觉 2020-12-11 04:28

How do I configure Visual Studio Code to debug a Flask (Python) web application?

For example, when I set the debugger in the view function, it should allow me to step

8条回答
  •  再見小時候
    2020-12-11 05:12

    To further extend on the answer from Guy, I had to configure a debugger for Visual Studio Code in a Windows environment with Anaconda 2. I did so by using the following:

    {
        "python.pythonPath": "C:\\ProgramData\\Anaconda2\\envs\\neuralnets\\python.exe"
    }
    

    with neuralnets being my Anaconda 2 virtual environment.

提交回复
热议问题