Home > Software design >  Problem in debugging django project using VS code
Problem in debugging django project using VS code

Time:12-02

I have a problem while debugging a django project using VS code, the problem that nothing happened when I click to debug button, I can launch my script just by tapping in terminal python manage.py runserver.

Here is my launch.json file, and note please that I tried a lot of examples, and still the same problem:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Django",
            "python": "C:/Users/msekmani/Desktop/dashboard_project/venv/Scripts/python.exe",
            "type": "python",
            "request": "launch",
            "program": "C:/Users/msekmani/Desktop/dashboard_project/IPv2/src/manage.py",
            "console": "internalConsole",
            "args": ["runserver"],
           "django": true,
           "justMyCode": true,
        },
    ]
}

I am using python version 3.6 and for the OS is Windows.

Note please that I also tried to creat a Python debug and also it's not working also, and here is my launch.json script:

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

CodePudding user response:

I find a solution to solve this problem by upgrade the python version to 3.7, I don't have any idea about the problem happened in version 3.6, by the way, the upgrade python version is the solution.

  • Related