Thread: How to enable debug mode to See changes on the fly?

How to enable debug mode to See changes on the fly?

From
Rahul Soshte
Date:
In my config_local.py I have made DEBUG_MODE = TRUE
Even then when I make changes to files in the codebase I am not able to see the changes instantly, I gotta restart the server again and again.I dont want to restart the server again and again to see my changes.
What do I do?

Re: How to enable debug mode to See changes on the fly?

From
Joao De Almeida Pereira
Date:
Hello Rahul,
In fact when you change python code there isn't much you can do, you need to restart the server every time.
For the Javascript code you can have a second console open and run `yarn bundle:watch` and it will regenerate the javascript code and you just need to refresh the webpage on the browser.

Thanks
Victoria & Joao

On Wed, Mar 28, 2018 at 12:23 PM Rahul Soshte <rahulsoshte360@gmail.com> wrote:
In my config_local.py I have made DEBUG_MODE = TRUE
Even then when I make changes to files in the codebase I am not able to see the changes instantly, I gotta restart the server again and again.I dont want to restart the server again and again to see my changes.
What do I do?

Re: How to enable debug mode to See changes on the fly?

From
Murtuza Zabuawala
Date:
Hi,

AFAIR we intentionally disabled it. The reason for this is that due to how the reload mechanism works there are some side-effects which was causing executing certain code twice.
Check commit: git log a49a3103e298fcc437

If you want to enable reloading for development purposes then you can simply change value of  use_reloader option to true, Set use_reloader = True in ../web/pgAdmin4.py +154

Restart pgAdmin4 and it should reload server whenever you save the changes in python files.


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Wed, Mar 28, 2018 at 11:41 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hello Rahul,
In fact when you change python code there isn't much you can do, you need to restart the server every time.
For the Javascript code you can have a second console open and run `yarn bundle:watch` and it will regenerate the javascript code and you just need to refresh the webpage on the browser.

Thanks
Victoria & Joao

On Wed, Mar 28, 2018 at 12:23 PM Rahul Soshte <rahulsoshte360@gmail.com> wrote:
In my config_local.py I have made DEBUG_MODE = TRUE
Even then when I make changes to files in the codebase I am not able to see the changes instantly, I gotta restart the server again and again.I dont want to restart the server again and again to see my changes.
What do I do?