Skip to content

Commit cc263b7

Browse files
committed
finish edits to first doc
1 parent 6ad84ef commit cc263b7

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ search.audienceType:
1313

1414
## Summary
1515

16-
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 issues in Power Apps canvas apps. This approach helps you troubleshoot problems that appear only for certain users or in specific environments. Live monitor shows real-time events like 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+
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 issues 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.
1717

1818
> [!NOTE]
1919
> If you can't use Live monitor (for example, in SharePoint forms or custom portal embeddings), see [Debug canvas apps without Live monitor](monitor-debugging-canvas-apps-without-live-monitor.md) for alternative approaches.
@@ -24,34 +24,34 @@ This article builds on [Debugging canvas apps with Live monitor](/power-apps/mak
2424

2525
## Combine Live monitor and Trace
2626

27-
Live monitor shows platform-level activity: data operations (`getRows`, `createRow`, `patch`), control evaluations, errors (HTTP status codes like `404` or `429`), timing, and delegation indicators.
27+
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 indicators.
2828

29-
By adding Trace calls in your behavior formulas (`OnSelect`, `OnVisible`, `OnStart`), you add context like:
29+
When you add Trace calls in your behavior formulas (`OnSelect`, `OnVisible`, `OnStart`), you capture context such as:
3030

31-
- Which user is running the app
32-
- Which environment the app is running in
33-
- Which screen is active
31+
- The user running the app
32+
- The current environment
33+
- The active screen
3434
- Entity counts (rows in collections, related records)
3535
- Business flags (VIP status, discount eligibility)
3636
- Elapsed times for operations
37-
- Any other information that helps you understand what the app is doing
37+
- Any other information that helps you understand app behavior
3838

3939
Together, Live monitor and Trace answer both "what happened" and "why."
4040

4141
### View data flowing over the network
4242

43-
Live monitor shows each data operation event with:
43+
Live monitor displays each data operation event with:
4444

4545
- Operation type (`getRows`, `createRow`, `patch`, `removeRow`)
4646
- Data source (Dataverse table or connector name)
4747
- Timing (start, finish, duration)
4848
- Result (success or error status code)
49-
- Delegation hints (non-delegable operations cause client-side processing)
49+
- Delegation hints (non-delegable operations trigger client-side processing)
5050

51-
Select an event to see details. Correlate events with nearby Trace records to understand *why* the operation occurred. For example, a `getRows` surge after a Trace with `phase: "ApplyFilters"` might indicate an inefficient filter expression.
51+
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.
5252

5353
> [!TIP]
54-
> If you see HTTP 429 (throttling), look at preceding events to see whether a loop or repeated evaluation triggered excessive operations. Optimize formulas or use collections to cache data and reduce network calls.
54+
> 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 to cache data and reduce network calls.
5555
5656
### Use Trace effectively
5757

@@ -60,13 +60,13 @@ The [Trace function](/power-platform/power-fx/reference/function-trace) writes a
6060
Key features:
6161

6262
- Works only in behavior properties (`OnSelect`, `OnChange`, `OnVisible`, `OnStart`).
63-
- Accepts text and a record payload for additional details.
64-
- `TraceSeverity` helps filter events (Information, Warning, Error). Use Error sparingly.
65-
- Has minimal performance impact when used appropriately. Remove or guard verbose traces before broad deployment.
63+
- Accepts a text message and an optional record payload for additional details.
64+
- `TraceSeverity` helps you filter events (Information, Warning, Error). Use Error sparingly.
65+
- Has minimal performance impact when used appropriately. Remove or guard verbose Trace calls before broad deployment.
6666

6767
#### Trace data property values with debug buttons
6868

69-
Because Trace can't be placed in data properties (like a label's `Text`), use temporary debug buttons to capture those values.
69+
Because you can't place Trace in data properties (such as a label's `Text`), use temporary debug buttons to capture those values.
7070

7171
To create a debug button:
7272

@@ -75,7 +75,7 @@ To create a debug button:
7575
1. When testing, add `&debug=true` to the app URL to show the button.
7676

7777
> [!TIP]
78-
> It's also useful to trace the values used to calculate a data property, as they might indicate why the value isn't what you expect.
78+
> Trace the input values used to calculate a data property. They often reveal why the result isn't what you expect.
7979
8080
##### Example debug snapshot button
8181

@@ -97,7 +97,7 @@ Trace(
9797
```
9898

9999
> [!NOTE]
100-
> Guard debug controls with query string parameters or role checks so end users don't see them. Remove these controls before you finalize the app.
100+
> Guard debug controls with query string parameters or role checks so that end users don't see them. Remove these controls before you finalize the app.
101101
102102
### Debugging checklist
103103

@@ -131,7 +131,7 @@ Capture what the app sees about each user (email, roles, customer selection, dis
131131
1. Open a new Live monitor instance and connect User B the same way.
132132
1. Compare the values to find the difference causing the problem.
133133

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

136136
```powerfx
137137
// Emit pre-submit context
@@ -180,11 +180,11 @@ Correlate Trace events with adjacent `getRows` or `patch` operations. If User B
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, this difference can cause the app to experience problems in one environment but not the other.
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+
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*.
188188

189189
#### Steps
190190

@@ -203,19 +203,19 @@ Surface environment-specific metadata and counts, then compare the sequence and
203203
```
204204
205205
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.
206+
1. Open Live monitor in *Test* and then in *Production*. Export logs if needed.
207207
208208
#### Analyze the results
209209
210210
In the event list:
211211
212-
- Compare `getRows` 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 that might indicate a non-delegable formula.
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.
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 created to see how it's populated.
216+
If you find a difference, add more Trace calls where the variable is set to see how it's populated.
217217
218-
If you see network errors (`4xx` responses), check whether tables, flows, and connectors are set up correctly in both environments.
218+
If you see network errors (`4xx` responses), verify that tables, flows, and connectors are configured correctly in both environments.
219219
220220
## Related content
221221

0 commit comments

Comments
 (0)