What is Debugger PIN when I run the flask app python

This is a security code for the debugger. Its purpose is to make access to the debugger more difficult for an attacker in a production environment. More details here


This is an additional security measure provided by Werkzeug (which is one of the dependencies for Flask) to prevent the debugger from being accessible without the knowledge of the PIN. You can use the debugger pin in the browser to launch the interactive debugger.

Please note you should never be using DEBUG mode in Production anyways because the stack trace of error can potentially reveal multiple aspects of your code.

The Debugger PIN is a just an added layer of security in case you inadvertently leave the Debug mode on in an Production application to make it difficult for the attacker to access the debugger .

Tags:

Python

Flask