Skip to Content
Technical Articles

a small tip for debugging UI5 events

Many of us might already know that if we had to debug an UI5 app or any standard Fiori apps, we usually go and activate the debug sources(check box) like shown below:

https://ui5.sap.com/#/topic/1ff250c2038849f5991209f7e6c36f1f

It’s because all standard fiori/ui5 apps & controls files are available in preload format.

Now after loading the debug sources, let’s say we have to check some button action or an event handler function functionality then put a break point in the below file at the function call line.

sap.ui.base.EventProvider (search in the sources tab)

So basically all the controls that registered the event handler functions to the events will be called from here. I will not discuss further as there is already some good information available in the below blogs:

https://blogs.sap.com/2016/06/09/compare-event-handling-mechanism-sapui5-and-angular/

https://qmacro.org/2015/07/14/base-classes-in-ui5/

 

But don’t go into the chain of event handlers that will be called there ( sometimes while debugging a standard control, don’t ask my why we have to debug the standard controls 😛 )

I use this trick a lot of times instead of going through all the code to find out where the code is written for an event. Especially while debugging the ui5 controls, classes to understand the root cause. It saved a lot of my time 🙂

Hope this will be useful for someone out there!

 

Thanks,

Mahesh

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