skip to Main Content

I am trying to try the debug tool in my vs code I am totally new to vs code and I am getting an error such as this when I run it
ERROR MESSAGE I have a folder called .vscode with a launch.json file `

  "version": "0.2.0",
    "configurations": [
        
        {
        "name": "Python: Django",
        "type": "python",
        "request": "launch",
        "program": "${workspaceFolder}\myPro\manage.py",
        "args": [
            "runserver"
        ],
        "django": true,
        "justMyCode": true
    }
    ]

}

I watched a lot of videos on youtube and I see people who have settings.json in there .vscode file.

WHAT I HAVE DONE:

I have downloaded django == 3.25

I have downloaded python == 3.10.4

IN a virtual environment my environment works perfectly fine its just that I can find the reason to this problem I would really appreciate it if someone can help me out

2

Answers


  1. Try Ctrl + Shift + P and the option "Select Python Interpreter", then select the one in which the environment is. This should have VSCode running in the same environment.

    Login or Signup to reply.
  2. Please change your debug settings to your Virtual Environment
    Open .py file and then debug it.
    You may have to restart vscode

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