Reputation: 81
Until recently my Django projects would debug fine using launch.json file. But it stopped working today and I have no idea about it.
Changes made by me in system were:
Problem Description:
The added configuration in launch.json file is as below:
{
"configurations": [
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}\\manage.py",
"args": [
"runserver"
],
"django": true,
"justMyCode": true,
"logToFile": true,
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"host": "localhost"
}
]
}
Can someone help to troubleshoot this, I have already tried:
My current options are:
Upvotes: 4
Views: 2742
Reputation: 9
When we install the VS code, the debugger configurations are set by default
let me give you the default configurations.
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Python Debugger: Django", "type": "debugpy", "request": "launch", "program": "${workspaceFolder}/manage.py", "args": [ "runserver" ], "django": true } ] }
Please find this code and try to replace this code with old code in .vscode/launch.json File.
Thanks.
Upvotes: -1
Reputation: 81
Posting answer within few minutes of posting question seems weird but I got a solution that could help to get perfect answer to my problem.
The problem was the python environment path: I created environment in documents folder of C drive of current non-admin user hoping of no issues since python is installed for just the current user in default path. But as soon as created new environment in current user directory the debugger started working normally.
The issue is related to permissions and file paths, hope this helps to get solution to new questions generated:
Adding images for further details:
Upvotes: 3