I often hear people complaining that they wished Power Apps had a debugger like developer tools in Chrome. When designing/debugging websites the dev tools is amazing. What a lot of makers don't realise is we have that (although maybe not quite as good) and its called Monitor, and for me its one of the most under used features in the platform.
Far too many developers don't use it, when they really should, so I want to explain how to get the most from Power Apps Monitor.
Where is it
What's great about Monitor is it can be used in 2 places, by dev and by users.
While in the design studio if you go to advanced tools and open Live monitor, you can now see all of the interactions and network traffic while you test the app.
The second is to run from the published app in the a main studio where all apps are listed.
Here you can share with yourself or with any user, but has to be the published version.
There is also an additional way and that's through a url. If you know the app url you can construct the monitor console url:
Example
App Url:
//apps.powerapps.com/play/e/548d6982-6e9f-47f2-4444-6ccb1c563187/a/1b0f360b-be03-4444-4444-ae8381705949?tenantId=2242945a-4ab9-4132-840e-cce1c66e31bb&hint=7ee7d90e-4444-4444-4444-e29c456c5718&sourcetime=1744897719480
Monitor Portal:
//make.powerapps.com/e/548d6982-6e9f-47f2-4444-6ccb1c563187/diag
How to Share
Unfortunately Monitor cant be ran from any session, it needs a monitoring session to be created and for the user to use it (ie a new url).
This also ensures the user is aware that they are being monitored and they feel safe sharing any data they are entering in the app.
Once shared you can copy the link and send it to them and remove them when required.
You can also share the monitoring session with other admins etc by Inviting them to the session.
How it Works
At its core Monitor is just a table of events, every click, screen navigate and data transmission is a row in the table.
From left to right:
- Id: Sequential reference
- Time: Hope you know this one
- Category: Type of event
- Operation: Event output type
- Result: Success/Fail/Warning
- Result Info: Detail on why the result
- Status: Network responses
- Duration: How long operation took
- Data source: Data source within the App
- Control: Component interacted with
- Property: Control parameter
- Response Size: Network package size
To see the full event/row as a json you can click on the properties side bar.
Most are self explanatory, below explains the less obvious:
Category
This is what is generating the record, the 3 I have seen are:
- UserAction - When user interacts with the app
- Network - Data request and response
- DataOperation - Modify data
- Function - Code ran
These are often batched together, as example:
UserAction triggers DataOperation and then Network
Operation
The detail from the category, as easy example if its a UserAction it could be a Select for a button press.
Some examples are:
- Select
- Text
- Value
- Trace
- SetProperty
- patchCreateRow
- createRow
- RemoveRow
- getRows
- getRowsCount
- getAttachments
- Search
Result
The outcome from the event, allowing us to see things that didn't complete or may not have ran correctly. The options are:
- Success
- Warning
- Error
Result Info
This is the detail from the event and is the key column. Any error messages are here and network detail, as example a get rows would show:
Requested 500 rows. Received 2 rows
How to Use
There are a couple of tips to levage the Monitor to its full potential.
Trace
Traces are the console.logs of Power FX (print for you python lovers), and allows us to pass custom data to the logs. They allow you to show additional information like variable value and on the fly calculations
The above is very simple, but you can add anything in the return, including more Power FX functions.
You can also set the result type:
Trace("Just to let you know",TraceSeverity.Information);
Trace("Maybe a problem",TraceSeverity.Warning);
Trace("Yep there is a problem",TraceSeverity.Error);
Trace("Your screwed, run",TraceSeverity.Critical);
There is also an option parameter to pass a record straight into the trace.
Trace(
"Just to let you know",
TraceSeverity.Information,
Index(ShowColumns(test,Name,Title),1)
);
Result
The result is your key filter to find errors and warnings, Interactions with apps can be high, so finding the events is key.
Duration
Tracking what is causing slow performance can be challenging, but you can sort the event table by duration to find the longest running events.
Additional the time stamp shows when one UserAction can trigger multiple events across screens.
Properties
The properties pane has all of the key information you need. It will cover not only the components, but the Power FX code, payload sent, and response.
Its particular great for errors, as in the app error is often less detailed.
Example in the app we get non-descript permission error
But in Monitor we can see the issue is not with the table we are patching, but the missing appentTo security role permission on a lookup table.
For me Monitor is a key part of my development, not only for building optimized apps, but in particular when working on bugs.
If you would like to get notified every new blog (I also do a few in the Power Platform Community), subscribe below
have used in model driven app.. thanks for sharing the detailed how to do