Debugging JS files in production environment in Fiori Application

In this blog, I will discuss a trick, using which we can easily debug JS file in the production environment. 

Many times we come accross a situation, where we need to debug the code in production enviroment. Since all the code is coming through component preload file therefore we can't make any changes to the source code, even we end up reading through the pretty print version of the code, which is even worse.

However, there is a standard trick available to debug the code using the sapui5 diagnostics and chrome dev tools.

1) Open the application in prod application.

2) Press CTRL + ALT + SHIFT + P to open Diagnostics window

3) Now Click the "Select specific modules" link.

4) Now you would be able to find all the controller and your other javascript files.

5) Select the required JS files and click on apply.

6) The app would load again, but this time check the chrome dev tools, you would be able to load you required JS file.

Note: to Search the particular file - Press CTRL + P and search file.

Comment below if you have any worries.

Hope you found this trick useful. Cheers!!

Next Post »