DEV Community

Kerschbaumer Stefan
Kerschbaumer Stefan

Posted on

Disabling Prod Mode in already Built Angular App in Chrome

In this small post i am talking about chromes "Override" tab.

Maybe this is well known and widely used but I just found out about it today and wanted to push it for beginners or people which are not using this cool feature of the Chrome DevTools for debugging.

Since chrome version 65 - any yeah I know that this version has been released back in the beginning of 2018 - there is a tab called "Overrides" within its DevTools Sources section which can be used to replace files which are normaly requested from the server belonging to the frontend with local files.

For this to work you just need to open your DevTools and go to Sources, from there you click on "Overrides" and select a folder for overrides.

Alt Text

After that you can go back to sources and right mouse click on a file to save it for overrides.
Alt Text

Chrome will then create a folder within your selected override folder named like the page you saved the file from containing all files you saving for this domain.

From here on you can make changes using the DevTools itself or any editor you'd like to use.

I.e we can take any main Js file generated after angulars build process and search for "enableProdMod" to in the end remove that line of code and get "ng.probe" again even after reloads.
Alt Text

Alt Text

happy debugging.

Top comments (0)