We know that once we enable debug mode via “Ctrl+Alt+Shift+P”, this setting will be persisted: even if you turn off your laptop and launch the application tomorrow, the debug mode will still be there.

/wp-content/uploads/2016/06/clipboard1_983078.png

In Chrome development tool, there is an Application tab which records this setting via key value pair using Local Storage.

/wp-content/uploads/2016/06/clipboard2_983079.png

As usual we can still use debug to investigate what has happened when the checkbox “Use Debug Sources(reload)” is clicked.

In Chrome development tool Elements tab, click the small arrow icon to enter the element inspection mode, then click the checkbox, then its html source code will be automatically navigate.

/wp-content/uploads/2016/06/clipboard3_983080.png


Perform global search via keyword “useDbgSources”, and then we can find the event handler onUseDbgSources for debug mode set:

/wp-content/uploads/2016/06/clipboard4_983081.png

Set a breakpoint on this function, then mark the checkbox in UI, breakpoint is triggered as expected:

/wp-content/uploads/2016/06/clipboard5_983082.png

Within the function, we can know the debugging flag is set via localStoage API: window.localStorage.setItem

/wp-content/uploads/2016/06/clipboard6_983083.png

This API will change the following file in my laptop:

/wp-content/uploads/2016/06/clipboard7_983084.png

/wp-content/uploads/2016/06/clipboard8_983085.png

If I open the changed file via some SQLite management tool, I can find the corresponding entry with key sap-ui-debug and value ‘X’ set:

/wp-content/uploads/2016/06/clipboard9_983086.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply