Skip to content

Commit c32cd70

Browse files
authored
Update monitor-debugging-canvas-apps.md
Edit review per CI 9270
1 parent 8557d2b commit c32cd70

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

support/power-platform/power-apps/create-and-use-apps/monitor-debugging-canvas-apps.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
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.
44
ms.date: 01/15/2026
55
ms.reviewer: carlosff, v-shaywood
66
ms.custom: sap:Running Canvas App
77
search.audienceType:
88
- maker
99
---
1010

11-
# Debug canvas apps by using Live monitor and Trace
11+
# Debug Canvas apps by using Live monitor and Trace
1212

1313
## Summary
1414

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.
1616

1717
> [!NOTE]
1818
> 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.
1919
2020
## Prerequisites
2121

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.
2323

2424
## Combine Live monitor and Trace
2525

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.
2727

2828
When you add Trace calls in your behavior formulas (`OnSelect`, `OnVisible`, `OnStart`), you capture context such as:
2929

30-
- The user running the app
30+
- The user who's running the app
3131
- The current environment
3232
- The active screen
3333
- Entity counts (rows in collections, related records)
@@ -39,15 +39,15 @@ Together, Live monitor and Trace answer both "what happened" and "why."
3939

4040
### View data flowing over the network
4141

42-
Live monitor displays each data operation event with:
42+
Live monitor displays each data operation event by providing:
4343

4444
- Operation type (`getRows`, `createRow`, `patch`, `removeRow`)
4545
- Data source ([Dataverse](/power-apps/maker/data-platform/data-platform-intro) table or connector name)
4646
- Timing (start, finish, duration)
4747
- Result (success or error status code)
4848
- Delegation hints ([non-delegable operations](/power-apps/maker/canvas-apps/delegation-overview#non-delegable-limits) trigger client-side processing)
4949

50-
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.
5151

5252
> [!TIP]
5353
> 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:
6161
- Works only in behavior properties (`OnSelect`, `OnChange`, `OnVisible`, `OnStart`).
6262
- Accepts a text message and an optional record payload for extra details.
6363
- `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.
6565

6666
#### Trace data property values by using debug buttons
6767

6868
Because you can't place Trace in data properties (such as a label's `Text`), use temporary debug buttons to capture those values.
6969

7070
To create a debug button:
7171

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).
7475
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.
7677

7778
> [!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.
7980
8081
##### Example debug snapshot button
8182

@@ -108,7 +109,7 @@ Use this checklist when troubleshooting canvas app problems:
108109
1. Use query string parameters (`Param`) to tag the environment or enable debug controls.
109110
1. Compare traces across users or environments. Look for different flags or counts.
110111
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.
112113

113114
## Example scenarios
114115

@@ -118,20 +119,19 @@ User A submits orders successfully, but User B sees failures and different UI be
118119

119120
#### Goal
120121

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.
122123

123124
#### Steps
124125

125126
1. Open the app in [Power Apps Studio](/power-apps/maker/canvas-apps/power-apps-studio).
126127
1. Add Trace calls in the `OnSelect` property of the submit button.
127128
1. Save and publish the app.
128129
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.
133133

134-
#### Example OnSelect formula with Trace
134+
#### Example OnSelect formula together with Trace
135135

136136
```powerfx
137137
// Emit pre-submit context
@@ -170,21 +170,21 @@ Trace(
170170

171171
#### Analyze the results
172172

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:
174174

175175
- 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.
178178

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.
180180

181181
### Scenario: App works in one environment but not another
182182

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.
184184

185185
#### Goal
186186

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*.
188188

189189
#### Steps
190190

@@ -202,18 +202,18 @@ Surface environment-specific metadata and counts, then compare the sequence and
202202
);
203203
```
204204
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.
207207
208208
#### Analyze the results
209209
210210
In the event list:
211211
212212
- 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.
214214
- Compare the Trace values. Do products have different values for `relatedOrders` or `hasDiscount`?
215215
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.
217217
218218
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.
219219

0 commit comments

Comments
 (0)