-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
I configured django single step debugging for Visual Studio Code with this tutorial:
https://gist.github.com/veuncent/1e7fcfe891883dfc52516443a008cfcb
The code
from django.conf import settings
if settings.DEBUG:
if os.environ.get('RUN_MAIN') or os.environ.get('WERKZEUG_RUN_MAIN'):
import ptvsd
ptvsd.enable_attach(address = ('0.0.0.0', 8005))
print("Attached remote debugger")
Caused an error in my application, because the django.conf.settings object was not available in one of my subapps.
I changed the code to
if os.environ.get('RG_START_PTVSD_DEBUGGER'):
if os.environ.get('RUN_MAIN') or os.environ.get('WERKZEUG_RUN_MAIN'):
import ptvsd
ptvsd.enable_attach(address = ('0.0.0.0', 8005))
print("Attached remote debugger")
And everything worked fine.
The error was only in the sslserver, not in django runserver itself
Metadata
Metadata
Assignees
Labels
No labels