skip to Main Content

Ik have created a python test file in VSC. When I run this file it works fine and I see my output in the browser (Dash/Flask). However when I try to debug the file in VSC it gives me an error "No module named test.py" For sure I select the Python debug option.

My file structure is:

-root
 -chapter
  -test.py

What is the difference in debug and not debug?

2

Answers


  1. Chosen as BEST ANSWER

    I tried some options. In the end this worked for me: "cwd": "${fileDirname}",


  2. Please check your launch.json. I have attached mine as a simple reference.

    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true,
        }
    ]
    

    By the way, you can debug here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search