cancel
Showing results for 
Search instead for 
Did you mean: 

Can Chrome Debugger use custom *-dbg.js files from SAPUI5-Apps automatically?

former_member306541
Participant
0 Kudos

Hello,

since Web IDE Full-Stack uses grunt for SAPUI5 deployment, Chrome does not show the original js-code but minified versions. But the original files are deployed at the same location with -dbg.js as their file endings.

I wonder, if it is possible to tell Chrome Debug Tools to automatically load these files during debugging?

Best regards,

Christian.

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor

HI Christian Späh,

Yes, you need to press 'CNTRL + ALT + SHIFT + P' then you can find the checkbox debug sources -> here if you check this and refresh the applicaiton, then all the libraries(standard) including your fiori app dbg files will be loaded. If you only want your app, then you can navigate and select only your app for degubbing.

But I dont think when you click on f12 it does that automatically.

You can also add 'sap-ui-debug=true' to the url to load the debugging sources.

BR,

Mahesh

former_member306541
Participant
0 Kudos

Hi Mahesh,

thank you very much. I tried 'sap-ui-debug=true' before, but I must have put it in the wrong place in the url, because it did not loaded my own resources.

Best regards,

Christian.

maheshpalavalli
Active Contributor
0 Kudos

Hi Christian Späh,

Yeah sometimes these small issues will consume most of our time 😄 .

Also, it is better to select the sources while debugging as it will take a lot of time to load all the sap ui5 dbg libraries if we directly put the 'sap-ui-debug=true' in the url.

BR,

Mahesh

former_member306541
Participant
0 Kudos

Hi Mahesh,

do you know why the minified/uglified versions are only saved within Component-preload.js? In my dist folder all js files are original regardless if they have dbg suffix or not. I use the standard "@sap/grunt-sapui5-bestpractice-build".

Best regards,

Christian.

maheshpalavalli
Active Contributor
0 Kudos

Hi Christian Späh,

Yeah, In fact when i used the openui5 grunt last time to minify the code, it only had generated the component preload.js. If we think about that only component preload.js is enough to minify the code as when we load the fiori app, it will load only the component preload but not the other files.

But from Webide, It will generate dbg files for every file. I think if you change config in the grunt file, it will give you the desired output. I would suggest you the open a new question for this discussion as per our community guidelines.

BR,

Mahesh

Answers (1)

Answers (1)

brian_keenan
Employee
Employee
0 Kudos

If you include the url parameter in the run configuration it will execute in debug mode always

former_member306541
Participant
0 Kudos

Hi Brian,

if I start my applications from within Web IDE, all resources are loaded in their original state. I do not have to set the debug mode. Maybe its because the minified/uglified versions are saved in Component-preload.js only. I took a look into the dist-directory and all js files aren't minified/uglified at all. I would have thought, that only the dbg-files would be original. Strange thing in my opinion.

Best regards,

Christian.