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.

runserver_plus creates two pin codes for werkzeug debugger

See original GitHub issue

Whenever I use runserver_plus to start a development server using the werkzeug debugger, it activates the debugger twice and prints out two pin codes. I expect there to be only one. Other than printing two pin codes in the terminal, the server runs perfectly as expected.

Steps to replicate:

# create a new empty virtualenv
pip install django ==1.9.2
pip install django-extensions==1.6.1
pip install werkzeug==0.11.3
django-admin.py startproject testproj
# Edit the testproj INSTALLED_APPS setting to include django_extensions
./manage.py runserver_plus

Output looks like this.

...
 * Debugger is active!
 * Debugger pin code: 140-764-085
 * Debugger is active!
 * Debugger pin code: 895-622-303

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tonycommented, Mar 29, 2016

@kkroboth In addition, fixed the issue with --noreload @ 4d83167.

I was able to test the werkzeug repl with and without --noreload.

1reaction
kkrobothcommented, Mar 2, 2016

@tony There is a misplaced comma making a tuple for handler.

With reload

$ ./manage.py runserver_plus 

 * Running on http://127.0.0.1:8000/ (Press CTRL+C to quit)
 * Restarting with stat

Performing system checks...

System check identified no issues (0 silenced).

Django version 1.9.2, using settings 'testproj.settings'
Development server is running at http://127.0.0.1:8000/
Using the Werkzeug debugger (http://werkzeug.pocoo.org/)
Quit the server with CONTROL-C.
 * Debugger is active!
 * Debugger pin code: 423-442-950

Without reload Works after removing comma.

$ ./manage.py runserver_plus --noreload

 * Running on http://127.0.0.1:8000/ (Press CTRL+C to quit)

The debuggers work in both instances, but the code is only shown after console is opened in browser if using –noreload.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RunServerPlus — django-extensions 3.2.1 documentation
Included with Werkzeug is a kick ass debugger that renders nice debugging tracebacks and adds an AJAX based debugger (which allows code execution...
Read more >
Debugging Applications — Werkzeug Documentation (2.2.x)
Starting with Werkzeug 0.11 the debug console is protected by a PIN. This is a security helper to make it less likely for...
Read more >
django-extensions Documentation - Read the Docs
Starting with Werkzeug 0.11 the debugger is additionally protected by a PIN. This is a security helper to make it less likely for...
Read more >
Using Werkzeug debugger with Django - /var/ - GitHub Pages
There are two components you need to install in your django project to use the ... Now, the “debugger pin” you see is...
Read more >
django-vb-baseapp - PyPI
WARNING | * Debugger PIN disabled. DEBUGGER UNSECURED! Let's create a blog app! $ python manage.py create_app blog # or $ rake new:application[blog]...
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