Skip to content

Commit 3acafd1

Browse files
committed
more edits
1 parent 13b2f57 commit 3acafd1

1 file changed

Lines changed: 33 additions & 33 deletions

File tree

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ search.audienceType:
1212

1313
## Summary
1414

15-
This article describes alternative debugging approaches for Power Apps canvas apps when [Live monitor](/power-apps/maker/monitor-canvasapps) isn't available. Use these techniques for SharePoint integrated forms, custom pages, or custom portal embeddings where you can't open Live monitor alongside the app.
15+
This article describes alternative debugging approaches for Power Apps [canvas apps](/power-apps/maker/canvas-apps/getting-started) when [Live monitor](/power-apps/maker/monitor-canvasapps) isn't available. Use these techniques for SharePoint integrated forms, custom pages, or custom portal embeddings where you can't open Live monitor alongside the app.
1616

17-
Live monitor is the recommended tool for debugging canvas apps because it displays real-time events and works with the [Trace function](/power-platform/power-fx/reference/function-trace). However, some hosted or embedded scenarios don't support it. This article covers alternatives such as Application Insights, Dataverse logging tables, SharePoint list logging, and on-screen diagnostics panels.
17+
Live monitor is the recommended tool for debugging canvas apps because it displays real-time events and works with the [Trace function](/power-platform/power-fx/reference/function-trace). However, some hosted or embedded scenarios don't support it. This article covers alternatives such as Application Insights, [Dataverse](/power-apps/maker/data-platform/data-platform-intro) logging tables, SharePoint list logging, and on-screen diagnostics panels.
1818

1919
> [!NOTE]
2020
> For scenarios where Live monitor is available, see [Debug canvas apps with Live monitor and Trace](monitor-debugging-canvas-apps.md).
@@ -44,21 +44,21 @@ For setup instructions, see [Analyze app telemetry using Application Insights](/
4444

4545
## Write debug records to Dataverse
4646

47-
If your environment includes Dataverse, create a custom **Debug Logs** table to capture diagnostic information. This approach works well for ad-hoc troubleshooting and audit trails.
47+
If your environment includes Dataverse, create a custom `Debug Logs` table to capture diagnostic information. This approach works well for ad-hoc troubleshooting and audit trails.
4848

4949
### Create the Debug Logs table
5050

51-
1. In [Power Apps](https://make.powerapps.com), go to **Tables** and create a new table named **Debug Logs**.
51+
1. In [Power Apps](https://make.powerapps.com), go to **Tables** and create a new table named `Debug Logs`.
5252
1. Add the following columns:
53-
- **Title** (Single line of text): A label for the log entry.
54-
- **UserEmail** (Single line of text): The email of the user.
55-
- **Timestamp** (Date and time): When the event occurred.
56-
- **Payload** (Multiple lines of text): Additional data in JSON format.
57-
- Add other columns as needed for your scenario (for example, **CartCount**, **ScreenName**).
53+
- `Title`: A label for the log entry.
54+
- `UserEmail`: The email of the user.
55+
- `Timestamp`: When the event occurred.
56+
- `Payload`: Additional data in JSON format.
57+
- Add other columns as needed for your scenario (for example, `CartCount`, `ScreenName`).
5858

5959
### Example: Write a debug record to Dataverse
6060

61-
Use a guarded `Patch` call to write records only when a debug query string parameter is present:
61+
Use a guarded [Patch](/power-platform/power-fx/reference/function-patch) call to write records only when a debug query string parameter is present:
6262

6363
```powerfx
6464
If(Param("debug") = "true",
@@ -78,25 +78,26 @@ If(Param("debug") = "true",
7878

7979
### Run the app in debug mode
8080

81-
To enable debug logging, add `&debug=true` to the app URL:
81+
To enable debug logging, add `&debug=true` to the app URL. For more information about query string parameters, see [Param function](/power-platform/power-fx/reference/function-param).
8282

83-
```text
84-
https://apps.powerapps.com/play/e/[environment-id]/a/[app-id]?debug=true
85-
```
86-
87-
After reproducing the issue, open the **Debug Logs** table in Dataverse to review the captured records.
83+
After reproducing the issue, open the `Debug Logs` table in Dataverse to review the captured records.
8884

8985
> [!NOTE]
9086
> Remove or disable debug logging before you deploy the app broadly. Periodically delete old log entries to manage storage.
9187
9288
## Write debug records to SharePoint
9389

94-
For lightweight environments without Dataverse, use a SharePoint list to capture debug information.
90+
For lightweight environments without Dataverse, use a [SharePoint](/connectors/sharepointonline/) list to capture debug information.
9591

9692
### Create the debug list
9793

98-
1. In SharePoint, create a new list named **AppDebugLogs**.
99-
1. Add columns for **Title**, **UserEmail**, **Timestamp**, **Payload**, and any other data you want to capture.
94+
1. In SharePoint, create a new list named `AppDebugLogs`.
95+
1. Add the following columns:
96+
- `Title`: A label for the log entry.
97+
- `UserEmail`: The email of the user.
98+
- `Timestamp`: When the event occurred.
99+
- `Payload`: Additional data in JSON format.
100+
- Add other columns as needed for your scenario.
100101

101102
### Example: Write a debug record to SharePoint
102103

@@ -122,9 +123,9 @@ If(Param("debug") = "true",
122123

123124
For immediate feedback during testing, create a diagnostics panel that displays debug information directly in the app. This approach is useful when you need to see values in real time.
124125

125-
### Step 1: Collect debug data
126+
### Collect debug data
126127

127-
Instead of using Trace, collect data to a local collection:
128+
Instead of using Trace, add data to a local [collection](/power-apps/maker/canvas-apps/create-update-collection). For example:
128129

129130
```powerfx
130131
If(
@@ -139,11 +140,11 @@ If(
139140
)
140141
```
141142

142-
### Step 2: Add a text control to display traces
143+
### Add a text control to display traces
143144

144145
Add a text control to the screen that shows the collected traces. Set its **Visible** property so it only appears in debug mode.
145146

146-
**Control properties:**
147+
#### Control properties
147148

148149
| Property | Value |
149150
| ----------- | ------------------------------------------------------------------------------ |
@@ -156,7 +157,7 @@ Add a text control to the screen that shows the collected traces. Set its **Visi
156157

157158
This displays a scrollable list of debug messages that you can copy and analyze outside the app.
158159

159-
### Example YAML for the text control
160+
#### Example YAML for the text control
160161

161162
If you're using Power Apps Studio's YAML view:
162163

@@ -178,20 +179,19 @@ If you're using Power Apps Studio's YAML view:
178179
```
179180
180181
> [!IMPORTANT]
181-
> Remove or hide the diagnostics panel before deploying the app to end users. Users who open the app with the debug parameter shouldn't see internal diagnostic information.
182+
> Remove or hide the diagnostics panel before you deploy the app to end users. Users who open the app with the debug parameter shouldn't see internal diagnostic information.
182183
183184
## Best practices for alternative debugging
184185
185-
- **Guard debug controls**: Use query string parameters (`Param("debug") = "true"`) or role checks to show debug features only during testing.
186-
- **Clean up before deployment**: Remove debug controls, logging calls, and diagnostic panels before you deploy broadly.
187-
- **Manage log storage**: For Dataverse or SharePoint logging, periodically delete old entries.
188-
- **Use meaningful labels**: Include descriptive titles like "BeforeSubmit" or "OnVisible_OrderScreen" to make logs easier to analyze.
189-
- **Include context**: Log the user email, screen name, and relevant data values so you can correlate entries across sessions.
186+
Follow these guidelines when using alternative debugging approaches:
187+
188+
- *Guard debug controls*: Use query string parameters (`Param("debug") = "true"`) or role checks to display debug features only during testing.
189+
- *Clean up before deployment*: Remove debug controls, logging calls, and diagnostic panels before you deploy broadly.
190+
- *Manage log storage*: For Dataverse or SharePoint logging, periodically delete old entries to manage storage.
191+
- *Use meaningful labels*: Include descriptive titles such as "BeforeSubmit" or "OnVisible_OrderScreen" to make logs easier to analyze.
192+
- *Include context*: Log the user email, screen name, and relevant data values so you can correlate entries across sessions.
190193

191194
## Related content
192195

193-
- [Debug canvas apps with Live monitor and Trace](monitor-debugging-canvas-apps.md)
194-
- [Analyze app telemetry using Application Insights](/power-apps/maker/canvas-apps/application-insights)
195196
- [Collaborative debugging with Live monitor](/power-apps/maker/monitor-collaborative-debugging)
196197
- [Live monitor overview](/power-apps/maker/monitor-overview)
197-
- [Trace function reference](/power-platform/power-fx/reference/function-trace)

0 commit comments

Comments
 (0)