Skip to content

Commit 0c2a858

Browse files
Merge pull request #5346 from MicrosoftEdge/user/chetanpandey/ImprovementInDoc
Improvement in Diagnostic Documentation
2 parents ba3f47a + 54eda8b commit 0c2a858

File tree

14 files changed

+126
-18
lines changed

14 files changed

+126
-18
lines changed

diagnostics/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Gathering Diagnostics and Logs
2-
This folder contains directions for gathering various detailed diagnostics/logs when reporting WV2-related issues. There's generally no need to proactively get any of these diagnostics before opening an issue, but if one seems obvious feel free to get it before opening an issue. Otherwise, a WV2 developer might link you to one of these pages to help them investigate an issue:
2+
This folder provides step-by-step instructions for collecting detailed diagnostics and logs to help troubleshoot WebView2-related issues. Before opening a new issue, please review the table below and gather the most relevant diagnostic logs for your scenario. Supplying the appropriate logs greatly improves the chances of a quick and accurate resolution.
33

4-
- [Crash Dumps](crash.md): Crash dumps are used to better understand why a WV2 process is crashing and firing a [ProcessFailed](https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2.processfailed) event.
5-
- [Crash Dumps from Task Manager](task_manager_dump.md): There are cases where crash dumps aren't automatically generated and need to be collected manually.
6-
- [ETW Trace](etw.md): Event Tracing for Windows (ETW) traces include detailed events on system state and the activities WV2 was doing before and when an issue occurs.
7-
- [Installer Logs](install.md): Installer logs include information about any errors that WV2's installer/updater hit when trying to install or update the WV2 runtime.
8-
- [GPU Info](gpu.md): GPU logs include details on the user's GPU and any potential graphics or rendering issues.
9-
- [Network Logs](network.md): Network logs include the network requests, responses, and details on any errors when loading files.
10-
- [Code Integrity](code_integrity.md): how to root cause STATUS_INVALID_IMAGE_HASH errors.
11-
- [Test in Canary](test_canary.md): how to test new WebView2 runtime changes by using Edge Canary.
4+
| Tool / Log | Purpose | Use Case |
5+
|---------------------------|-------------------------------------------------------------------------|--------------------------------------------------------------------------|
6+
| [Crash Dumps](crash.md) | Capture crash data for WebView2 processes. | Used when a child process crashes (via ProcessFailed event) or browser process fails. |
7+
| [ETW Trace](etw.md) | Event Tracing for Windows logs detailed system and WebView2 activity. | **Preferred log for most WebView2 issues.** Used to analyze system state and WebView2 behavior before/during issues. |
8+
| [Memory Dumps (Task Manager)](task_manager_dump.md)| Manual memory capture for unresponsive processes. | Helpful when WebView2 hangs or becomes non-responsive. |
9+
| [Installer Logs](install.md) | Logs errors encountered during WebView2 runtime installation or updates.| Diagnose installation failures or update issues. |
10+
| [GPU Info](gpu.md) | Provides details about the GPU and rendering pipeline. | Useful for troubleshooting graphics-related problems. |
11+
| [Network Logs](network.md) | Records network requests, responses, and errors. | Diagnose issues with loading resources or connectivity failures. |
12+
| [Code Integrity](code_integrity.md) | Identifies root causes of `STATUS_INVALID_IMAGE_HASH` errors. | Used when encountering image hash validation failures. |
13+
| [Test in Canary](test_canary.md) | Allows testing of WebView2 runtime changes using Edge Canary builds. | Preview and validate fixes or features before stable release. |
14+
| [Procmon (Process Monitor)](procmon.md) | Captures detailed file system, registry, and process activity. | Useful for diagnosing issues such as missing files, access denied errors, or interference from other processes. |
15+
| [Time Travel Debugging (TTD)](ttd.md) | Captures detailed call stacks and execution sequences. | Ideal for deep debugging when other logs are insufficient. |

diagnostics/code_integrity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and exit code -1073740760 or STATUS_INVALID_IMAGE_HASH.
99

1010
Users may see error page in the WebView2:
1111

12-
![Compatibility problem](compatibility_problem.png)
12+
![Compatibility problem](resources/compatibility_problem.png)
1313

1414
## Update antimalware software
1515
Starting versions 118 and 119 the options to disable Code Integrity in WebView2 are deprecated and the guard is always on.

diagnostics/crash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ By default the user data folder is created in the app's folder by default with a
1111

1212
If you do not have crash dumps - please navigate your webview2 control to `edge://crashes` to see if there are new reports. Copy necessary data to Clipboard and share with us.
1313

14-
![crashes](crashes.png)
14+
![crashes](resources/crashes.png)

diagnostics/etw.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Gathering an ETW Trace
22
[Event Tracing for Windows (ETW)](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/event-tracing-for-windows)traces include detailed events on system state and the activities WV2 was doing before and when an issue occurs.
33

4-
This repo has a WV2 recording profile - [WebView2_CPU.wprp](WebView2_CPU.wprp) that includes the events that we find most useful.
4+
This repo has two WebView2 recording profiles:
55

6-
ETW traces can get fairly large, so try to keep the amount of extra time spent when recording as small as possible. If you need a longer trace, ask the WV2 developer that you're working with if `WebView2.wprp` will suffice (it gathers less data).
6+
1. **[WebView2_CPU.wprp](resources/WebView2_CPU.wprp) [Recommended]**: This is the default recording profile that captures most of the useful events for diagnosing WebView2 issues, including CPU sampling data. Use this profile for most scenarios.
7+
8+
2. **[WebView2.wprp](resources/WebView2.wprp)**: This profile is recommended when you need to capture longer scenarios and the size of the ETW traces becomes too large. It excludes some data (like CPU sampling data) to produce smaller trace files.
9+
10+
ETW traces can get fairly large, so try to keep the recording time as short as possible while still capturing the issue. If you need a longer trace, ask the WebView2 developer you're working with if `WebView2.wprp` will suffice.
711

812
1. Close Edge and any other apps using WV2 to make the trace more clear. Common apps using WV2 may include `widgets.exe`, `msteams.exe`, and Microsoft Office products.
9-
2. Download [WebView2_CPU.wprp](WebView2_CPU.wprp) from this repo.
10-
3. If your app has a specific profile, merge it with [WebView2_CPU.wprp](WebView2_CPU.wprp) to ensure all events are captured in a single ETL file.
13+
2. Download [WebView2_CPU.wprp](resources/WebView2_CPU.wprp) from this repo.
14+
3. **Optional**: If your app has a specific profile, merge it with [WebView2_CPU.wprp](resources/WebView2_CPU.wprp) to ensure all events are captured in a single ETL file.
1115
4. In an elevated command prompt run `wpr -start WebView2_CPU.wprp -filemode` (wpr.exe is included in Windows).
1216
5. Reproduce the issue.
1317
6. In an elevated command prompt run `wpr -stop trace.etl "trace"`.

diagnostics/procmon.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Procmon
2+
3+
Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. Read more [here](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon).
4+
5+
Procmon logs help quickly identify issues like missing files, registry errors, or process conflicts affecting WebView2.
6+
7+
8+
### Steps to collect Procmon logs
9+
10+
1. Download Procmon from [Microsoft Learn](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon).
11+
12+
2. Extract the zip file and copy **Procmon.exe** (or **Procmon64.exe** for 64-bit systems) to the target machine.
13+
14+
3. Launch **Procmon.exe** and accept the license agreement.
15+
16+
4. By default, Procmon starts capturing events immediately.
17+
18+
5. Stop the capture by clicking the **Capture button** (or **File > Capture Events**).
19+
20+
6. Before capturing the logs, one can also add filters like process id, process name, etc. using the **Filter button**.
21+
22+
7. After applying the filters, start capturing the log by clicking the **Capture button**.
23+
24+
8. After your repro, again click the **Capture button** to stop the capturing and then using the save button, save the logs as a .PML file to any location.
25+
26+
9. Compress these logs and share the zip file.
File renamed without changes.
297 KB
Loading

0 commit comments

Comments
 (0)