CARVIEW |
The web framework for perfectionists with deadlines.
Issues
Using Winpdb to debug Django apps is pretty straight forward. You can go to Winpdb Docs to learn the basics of Winpdb.
After learning Winpdb, make sure that you launch your django server with --noreload or your breakpoints won't work.
Fors instance, to debug a view you'd:
1) Add "import rpdb2" in the begining of your app's views.py
2) Add "rpdb2.start_embedded_debugger("any_password")" in your certain view, on the line which one you want to debug.
4) Launch embedded django webserver: $"python manage.py runserver --noreload"
5) Launch winpdb: $"winpdb"
7) In your web browser, go to the url which would trigger the view you want to debug. In the browser you'll see "Loading" and nothing else happening.
6) Get back to Winpdb window. Choose file->Attach.
7) Enter "any_password", click "Ok".
8) Click on the Line in the List View, below PID FILENAME similar to "12789 /home/user/django_project/django_app...". Click OK.
9) An error message "Warning: You attached to an embedded debuger" should appear. click cancel.
10) If what you see in WinPDB windows doesn't seem to make much sense(and even though it does!:) - https://winpdb.org/tutorial/WinpdbTutorial.html should be your next step. Happy debugging!:)
Download in other formats:
Django Links
Learn More
Get Involved
Follow Us
- Hosting by In-kind donors
- Design by Threespot &
© 2005-2025 Django SoftwareFoundation unless otherwise noted. Django is a registered trademark of the Django Software Foundation.