question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't debug Django applications any longer

See original GitHub issue

Issue Type: Bug

Hi Team, I am no longer able to debug my Django applications in VSCode. I tried both existing configuration and new experimental configurations and none of them really work. When I use normal config (given below), django server starts but all breakpoints converts to: ‘Unverified breakpoint’ and code never stops on the set breakpoints.

{
            "name": "Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "--noreload",
                "--nothreading"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Django"
            ]
        }

With experimental config, django server never starts and all i get in console is this message:

pydev debugger: starting pydev debugger: New process is launching (breakpoints won’t work in the new process). pydev debugger: To debug that process please enable ‘Attach to subprocess automatically while debugging?’ option in the debugger settings.

Experimental config:

{
            "name": "Django Experimental",
            "type": "pythonExperimental",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "--noreload",
                "--nothreading",
            ],
            "django": true,
        }

Extension version: 2018.5.0 VS Code version: Code 1.23.1 (d0182c3417d225529c6d5ad24b7572815d0de9ac, 2018-05-10T16:04:33.747Z) OS version: Linux x64 4.4.0-128-generic

System Info
Item Value
CPUs Intel® Core™ i7-8650U CPU @ 1.90GHz (8 x 2197)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: unavailable_software
video_encode: enabled
vpx_decode: unavailable_software
webgl: enabled
webgl2: enabled
Load (avg) 2, 1, 1
Memory (System) 7.66GB (0.72GB free)
Process Argv /snap/vscode/37/usr/share/code/code
Screen Reader no
VM 0%

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
asandeepcommented, Aug 6, 2018

Hey Don,

A small update, I just tried debugging same repository with Pycharm CE and it worked seemlessly.

0reactions
DonJayamannecommented, Aug 6, 2018

Based on the info provided it works with the experimental debugger. Please ignore the warning message you get at the start. It should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't debug Django applications any longer #1991 - GitHub
Hi Team, I am no longer able to debug my Django applications in VSCode. I tried both existing configuration and new experimental configurations ......
Read more >
How to debug in Django, the good way? - Stack Overflow
There are a bunch of ways to do it, but the most straightforward is to simply use the Python debugger. Just add following...
Read more >
Can't debug Django app but run success
In debug mode, I set breakpoints, the Django project can run and jump over the breakpoints not pause at breakpoints. My Pycharm version:...
Read more >
django-admin and manage.py
django -admin is Django's command-line utility for administrative tasks. ... If you want to exclude multiple applications, pass --exclude more than once:.
Read more >
How To Debug a Django Application in VS CODE ... - YouTube
Set breakpoints and debug a live Django Application !Here's the code snippet for the VS Code configuration you will need to debug a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found