You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/power-platform/power-apps/create-and-use-apps/monitor-debugging-canvas-apps.md
+31-31Lines changed: 31 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,33 @@
1
1
---
2
-
title: Diagnose Canvas App Issues with Trace and Live Monitor
3
-
description: Discover how to troubleshoot canvas app issues with Live monitor and Trace. Monitor real-time data operations, errors, and performance for better app diagnostics.
2
+
title: Diagnose canvas apps issues with Trace and Live monitor
3
+
description: Discover how to troubleshoot canvas app issues by using Live monitor and Trace. Monitor real-time data operations, errors, and performance for better app diagnostics.
4
4
ms.date: 01/15/2026
5
5
ms.reviewer: carlosff, v-shaywood
6
6
ms.custom: sap:Running Canvas App
7
7
search.audienceType:
8
8
- maker
9
9
---
10
10
11
-
# Debug canvas apps by using Live monitor and Trace
11
+
# Debug Canvas apps by using Live monitor and Trace
12
12
13
13
## Summary
14
14
15
-
This article explains how to use [Live monitor](/power-apps/maker/monitor-overview) with the [Trace function](/power-platform/power-fx/reference/function-trace) to diagnose problems in Power Apps canvas apps. This approach helps you troubleshoot problems that occur only for certain users or in specific environments. Live monitor displays real-time events such as network calls, data operations, errors, and performance details. The Trace function lets you add custom diagnostic records to capture values from [behavior formulas](/power-apps/maker/canvas-apps/working-with-formulas#manage-app-behavior) at key moments.
15
+
This article explains how to use [Live monitor](/power-apps/maker/monitor-overview)together with the [Trace function](/power-platform/power-fx/reference/function-trace) to diagnose problems in Microsoft Power Apps canvas apps. This approach helps you troubleshoot problems that occur for only certain users or in specific environments. Live monitor displays real-time events such as network calls, data operations, errors, and performance details. The Trace function lets you add custom diagnostic records to capture values from [behavior formulas](/power-apps/maker/canvas-apps/working-with-formulas#manage-app-behavior) at key moments.
16
16
17
17
> [!NOTE]
18
18
> If you can't use Live monitor (for example, in SharePoint forms or custom portal embeddings), see [Debug canvas apps without Live monitor](monitor-alternatives-canvas-apps.md) for alternative approaches.
19
19
20
20
## Prerequisites
21
21
22
-
This article builds on [Debugging canvas apps with Live monitor](/power-apps/maker/monitor-canvasapps) and [Collaborative troubleshooting using Live Monitor](/power-apps/maker/monitor-collaborative-debugging). Review those articles first if you're new to Live monitor.
22
+
This article builds on [Debugging canvas apps with Live monitor](/power-apps/maker/monitor-canvasapps) and [Collaborative troubleshooting using Live Monitor](/power-apps/maker/monitor-collaborative-debugging). If you're new to Live monitor, review those articles before you proceed.
23
23
24
24
## Combine Live monitor and Trace
25
25
26
-
Live monitor displays platform-level activity: data operations (`getRows`, `createRow`, `patch`), control evaluations, errors (HTTP status codes such as `404` or `429`), timing, and [delegation](/power-apps/maker/canvas-apps/delegation-overview) indicators.
26
+
Live monitor displays platform-level activity: Data operations (`getRows`, `createRow`, `patch`), control evaluations, errors (HTTP status codes such as `404` or `429`), timing, and [delegation](/power-apps/maker/canvas-apps/delegation-overview) indicators.
27
27
28
28
When you add Trace calls in your behavior formulas (`OnSelect`, `OnVisible`, `OnStart`), you capture context such as:
29
29
30
-
- The user running the app
30
+
- The user who's running the app
31
31
- The current environment
32
32
- The active screen
33
33
- Entity counts (rows in collections, related records)
@@ -39,15 +39,15 @@ Together, Live monitor and Trace answer both "what happened" and "why."
39
39
40
40
### View data flowing over the network
41
41
42
-
Live monitor displays each data operation event with:
42
+
Live monitor displays each data operation event by providing:
43
43
44
44
- Operation type (`getRows`, `createRow`, `patch`, `removeRow`)
45
45
- Data source ([Dataverse](/power-apps/maker/data-platform/data-platform-intro) table or connector name)
Select an event to view details. Correlate events with nearby Trace records to understand *why* the operation occurred. For example, a surge in `getRows` calls after a Trace with `phase: "ApplyFilters"` might indicate an inefficient filter expression.
50
+
Select an event to view the details. Correlate the events with nearby Trace records to understand why the operation occurred. For example, a surge in `getRows` calls after a Trace operation with `phase: "ApplyFilters"` might indicate an inefficient filter expression.
51
51
52
52
> [!TIP]
53
53
> If you see HTTP 429 (throttling), check preceding events to determine whether a loop or repeated evaluation triggered excessive operations. Optimize formulas or use [collections](/power-apps/maker/canvas-apps/create-update-collection) to cache data and reduce network calls.
@@ -61,21 +61,22 @@ Key features:
61
61
- Works only in behavior properties (`OnSelect`, `OnChange`, `OnVisible`, `OnStart`).
62
62
- Accepts a text message and an optional record payload for extra details.
63
63
-`TraceSeverity` helps you filter events (Information, Warning, Error). Use Error sparingly.
64
-
- Has minimal performance impact when used appropriately. Remove or guard verbose Trace calls before broad deployment.
64
+
- Has minimal performance effect when used appropriately. Remove or guard verbose Trace calls before you run a broad deployment.
65
65
66
66
#### Trace data property values by using debug buttons
67
67
68
68
Because you can't place Trace in data properties (such as a label's `Text`), use temporary debug buttons to capture those values.
69
69
70
70
To create a debug button:
71
71
72
-
1. Add a button named `btnDebugSnapshot` with **Visible** set to `Param("debug") = "true"`.
73
-
1. For more information about passing parameters, see [Param function](/power-platform/power-fx/reference/function-param).
72
+
1. Add a button that's named `btnDebugSnapshot` and that has the **Visible** setting set to `Param("debug") = "true"`.
73
+
74
+
For more information about how to pass parameters, see [Param function](/power-platform/power-fx/reference/function-param).
74
75
1. In `OnSelect`, call Trace with a snapshot record.
75
-
1. When testing, add `&debug=true` to the app URL to show the button.
76
+
1. When you test, add `&debug=true` to the app URL in order to show the button.
76
77
77
78
> [!TIP]
78
-
> Trace the input values you use to calculate a data property. They often reveal why the result isn't what you expect.
79
+
> Trace the input values that you use to calculate a data property. These values often reveal why the result isn't what you expect.
79
80
80
81
##### Example debug snapshot button
81
82
@@ -108,7 +109,7 @@ Use this checklist when troubleshooting canvas app problems:
108
109
1. Use query string parameters (`Param`) to tag the environment or enable debug controls.
109
110
1. Compare traces across users or environments. Look for different flags or counts.
110
111
1. Correlate Trace events with network events (throttling, errors, extra calls).
111
-
1. Remove or guard verbose Trace calls before broad deployment.
112
+
1. Remove or guard verbose Trace calls before you run a broad deployment.
112
113
113
114
## Example scenarios
114
115
@@ -118,20 +119,19 @@ User A submits orders successfully, but User B sees failures and different UI be
118
119
119
120
#### Goal
120
121
121
-
Capture what the app sees about each user (email, roles, customer selection, discount eligibility) and compare it with the data operations in Live monitor.
122
+
Capture what the app sees about each user (email, roles, customer selection, discount eligibility), and then compare it with the data operations in Live monitor.
122
123
123
124
#### Steps
124
125
125
126
1. Open the app in [Power Apps Studio](/power-apps/maker/canvas-apps/power-apps-studio).
126
127
1. Add Trace calls in the `OnSelect` property of the submit button.
127
128
1. Save and publish the app.
128
129
1. Open Live monitor for the published app.
129
-
1. Select **Connect user** to invite User A.
130
-
1. As User A runs through the app, you see both the built-in events and your custom Trace calls.
131
-
1. Open a new Live monitor instance and connect User B the same way.
132
-
1. Compare the values to find the difference causing the problem.
130
+
1. Select **Connect user** to invite User A. As User A runs through the app, you see both the built-in events and your custom Trace calls.
131
+
1. Open a new Live monitor instance, and then connect User B the same manner.
132
+
1. Compare the values to find the difference that causes the problem.
133
133
134
-
#### Example OnSelect formula with Trace
134
+
#### Example OnSelect formula together with Trace
135
135
136
136
```powerfx
137
137
// Emit pre-submit context
@@ -170,21 +170,21 @@ Trace(
170
170
171
171
#### Analyze the results
172
172
173
-
In Live monitor, filter by Trace events, button name, or search for "Debug:" in the info column. Compare User A vs. User B:
173
+
In Live monitor, filter by Trace events, button name, or search for "Debug:" in the info column. Compare User A to User B:
174
174
175
175
- Do they have different `isVIP` values? This difference could change discount calculations.
176
-
- Are cart counts identical? If not, upstream logic differs.
177
-
- Are error traces present only for User B? Expand the event to inspect error details.
176
+
- Are cart counts identical? If not, the upstream logic differs.
177
+
- Are error traces present only for User B? Expand the event to inspect the error details.
178
178
179
-
Correlate Trace events with adjacent `getRows` or `patch` operations. If User B triggers extra data calls (for example, a non-delegable filter forcing multiple network requests), you see them in the event table.
179
+
Correlate Trace events with adjacent `getRows` or `patch` operations. If User B triggers extra data calls (for example, a non-delegable filter that forces multiple network requests), you see them in the event table.
180
180
181
181
### Scenario: App works in one environment but not another
182
182
183
-
Your app works correctly in *Test* but fails in *Production*. For example, a gallery loads no items and submission is slow. Even though the app is the same, the data in each environment can differ. Missing tables, different column values, larger datasets that trigger delegation limits, or permission differences can cause the app to behave differently.
183
+
Your app works correctly in *Test* but fails in *Production*. For example, a gallery loads no items, and submission is slow. Even though the app is the same, the data in each environment can differ. Missing tables, different column values, larger datasets that trigger delegation limits, or permission differences can cause the app to behave differently.
184
184
185
185
#### Goal
186
186
187
-
Surface environment-specific metadata and counts, then compare the sequence and status codes of data operations between environments. In this example, the app has one screen with a form where a **Product** selected from a gallery can be updated. The update works in *Test* but fails in *Production*.
187
+
Gather environment-specific metadata and counts, and then compare the sequence and status codes of data operations between environments. In this example, the app has one screen that includes a form in which a **Product** that's selected from a gallery can be updated. The update works in *Test* but fails in *Production*.
188
188
189
189
#### Steps
190
190
@@ -202,18 +202,18 @@ Surface environment-specific metadata and counts, then compare the sequence and
202
202
);
203
203
```
204
204
205
-
1. Deploy the app with the new traces to production.
206
-
1. Open Live monitor in *Test* and then in *Production*. Export logs if needed.
205
+
1. Deploy the app by including the new traces to production.
206
+
1. Open Live monitor in *Test*, and then in *Production*. If it's necessary, export the logs.
207
207
208
208
#### Analyze the results
209
209
210
210
In the event list:
211
211
212
212
- Compare `getRows` events for **Products** across environments. Does one return zero results or error codes (`404` if the table is missing, `403` if access is denied, `429` if throttled)?
213
-
- Look for repeated `getRows` calls, which might indicate a non-delegable formula.
213
+
- Look for repeated `getRows` calls. These might indicate a non-delegable formula.
214
214
- Compare the Trace values. Do products have different values for `relatedOrders` or `hasDiscount`?
215
215
216
-
If you find a difference, add more Trace calls where the variable is set to see how it's populated.
216
+
If you find a difference, add more Trace calls in which the variable is set, and then examine how the calls are populated.
217
217
218
218
If you see network errors (`4xx` responses), verify that tables, [flows](/power-automate/overview-cloud), and [connectors](/connectors/connectors) are configured correctly in both environments.
0 commit comments