Quickly debug your Canvas Apps with Monitor

22nd October 2022

Do you ever run into issues with your Canvas Apps during development. The answer is YES… no arguments 🙂

All of us encounter spots during our development where we’ve either made a mistake somewhere, implemented something in the wrong way, or we don’t quite understand why something is going wrong. When this happens, we need a quick way to identify what the issue is in our app causing the experienced problem, though this can be difficult if we’re just looking through property’s formulas for different controls and rather than this we should potentially think about adopting the use of a tool to identify the issue we might be having.

Recently, I was working on an app for mobile usage with offline capabilities. On one of my screens I had a combobox control which looked directly at a Dataverse table. This combobox was hidden until a certain activity occured in my app, but this doesn’t however mean that when I navigate to the screen it is on, my app won’t try to load the control and any data it potentially references.

So… my issue was that when I was offline, my device was trying to get data from the network displaying an error which I didn’t think it was doing. This was because of the hidden control referencing a Dataverse table directly which it was trying to get data from. But without doing trial and error with my formulas until I’d fixed the issue, how did I know this was what was going wrong?

Using the Monitor

To access the monitor, open your canvas app in edit mode and select open monitor from the advanced tools in the left hand side. Then to use it, whilst still in the studio and not in proper play mode, preview your app to see activity start to appear in the monitor.

An Example

So, to explain what I’ve got in my app. I have 2 screens. One is called ‘Offline Data Screen’ and the other is called ‘Online Data Screen’. On my offline data screen I have a combobox with 3 items in it as part of the Power Apps sample data, which is not pulling from a data source but is being used from my app directly. Then on my online data screen I have a combobox that has a dataverse table as its data source referencing the name field of my Dataverse Accounts table.

By going into preview mode from my offline screen, and then clicking my button to navigate to my online screen which has my combobox referencing online data, I will see logs appear of category ‘network’ and operation ‘getRows’. This shows me I have an online element in my app which may not be suitable for an app I am developing to have offline functionality. It may be suitable for my app to reference online data in another part of my app, for example the OnStart, however in this part it isn’t going to suit my requirement.

But… in this requirement you can see that if I have multiple controls on my screen, some of which could be hidden, then I might not realise that I’ve accidentally referenced an online data source in one of my controls, but Monitor will point that out for me! This makes debugging an offline app for example 10x easier!

I hope this helped and lets you debug your Power Apps more easily and quickly! If you’ve got any questions or additional points around this topic, pop them down below in the comments 🙂

Posted in Power Apps

Leave a Reply

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

This will close in 0 seconds