Reputation: 609
I already setup a debugger for an existing django 1,11 project on vscode with the Microsoft python extension, but this will only works on http://127.0.0.1:5000/ (the homepage) I need this debugger to be hooked to my already running server on http://localhost:8000/ I need a setup that allows me to debug on vscode, make the code stop at specific breakpoints, debug code for various URLs using google chrome. This is my launch.json
{
// 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: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver",
"--noreload",
"--nothreading"
],
"django": true
}
]
}
Python 2.7 Django 1.11 Visual Studio Code MacOS Catalina Please help.
Upvotes: 1
Views: 851
Reputation: 391
Use 8000 as shown below in your setup
{
// 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: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver",
"8000",
"--noreload",
"--nothreading"
],
"django": true
}
]
}
Upvotes: 0