Skip to content

Commit be156e0

Browse files
author
Chetan Pandey
committed
Add more clear instructions
1 parent 2b4748c commit be156e0

File tree

6 files changed

+33
-35
lines changed

6 files changed

+33
-35
lines changed

diagnostics/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Gathering Diagnostics and Logs
2-
3-
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.
43

54
| Tool / Log | Purpose | Use Case |
65
|---------------------------|-------------------------------------------------------------------------|--------------------------------------------------------------------------|
76
| [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. |
88
| [Memory Dumps (Task Manager)](task_manager_dump.md)| Manual memory capture for unresponsive processes. | Helpful when WebView2 hangs or becomes non-responsive. |
9-
| [ETW Trace](etw.md) | Event Tracing for Windows logs detailed system and WebView2 activity. | Used to analyze system state and WebView2 behavior before/during issues. |
109
| [Installer Logs](install.md) | Logs errors encountered during WebView2 runtime installation or updates.| Diagnose installation failures or update issues. |
11-
| [GPU Info](gpu.md) | Provides details about the GPU and rendering pipeline. | Useful for troubleshooting graphics-related problems. |
10+
| [GPU Info](gpu.md) | Provides details about the GPU and rendering pipeline. | Useful for troubleshooting graphics-related problems. |
1211
| [Network Logs](network.md) | Records network requests, responses, and errors. | Diagnose issues with loading resources or connectivity failures. |
1312
| [Code Integrity](code_integrity.md) | Identifies root causes of `STATUS_INVALID_IMAGE_HASH` errors. | Used when encountering image hash validation failures. |
1413
| [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. |
15-
| [Procmon (Process Monitor)](procmon.md) | Logs file and registry access events. | Useful for diagnosing file not found or access denied errors. |
16-
| [Time Travel Debugging (TTD)](ttd.md) | Captures detailed call stacks and execution sequences. | Ideal for deep debugging when other logs are insufficient. |
17-
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/etw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ETW traces can get fairly large, so try to keep the amount of extra time spent w
77

88
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.
99
2. Download [WebView2_CPU.wprp](resources/WebView2_CPU.wprp) from this repo.
10-
3. 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.
10+
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.
1111
4. In an elevated command prompt run `wpr -start WebView2_CPU.wprp -filemode` (wpr.exe is included in Windows).
1212
5. Reproduce the issue.
1313
6. In an elevated command prompt run `wpr -stop trace.etl "trace"`.

diagnostics/procmon.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
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).
44

5-
Procmon logs can be helpful for cases where we get file not found error or access denied.
5+
Procmon logs help quickly identify issues like missing files, registry errors, or process conflicts affecting WebView2.
66

77

88
### Steps to collect Procmon logs
99

10-
1. Download Procmon from [Microsoft Learn](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon)
10+
1. Download Procmon from [Microsoft Learn](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon).
1111

1212
2. Extract the zip file and copy **Procmon.exe** ( or **Procmon64.exe** for 64-bit systems) to the target machine.
1313

14-
3. Launch **Procmon.exe** and accept the license agreement
14+
3. Launch **Procmon.exe** and accept the license agreement.
1515

1616
4. By default, Procmon starts capturing events immediately.
1717

18-
5. Stop the capture by clicking the **Play button**.
18+
5. Stop the capture by clicking the **Capture button** (or **File > Capture Events**).
1919

20-
6. Before capturing the logs, one can add filters using the Filter button.
20+
6. Before capturing the logs, one can add also filters like process id, process name, etc. using the **Filter button**.
2121

22-
7. After applying the filters, start capturing the log by clicking the **Play button**.
22+
7. After applying the filters, start capturing the log by clicking the **Capture button**.
2323

24-
8. After your repro, again click the **Play button** to stop the capturing and then using the save button, save the logs as .PML file to any location.
24+
8. After your repro, again click the **Capture button** to stop the capturing and then using the save button, save the logs as .PML file to any location.
2525

2626
9. Compress these logs and share the zip file.
-102 KB
Loading

diagnostics/task_manager_dump.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In some cases, a user might need to manually gather a memory dump, normally for
44
1. Open Task Manager (Ctrl+Shift+Esc).
55
2. Click "Details" on the left menu.
66
3. Sort by the "Name" column.
7-
4. Scroll to find "msedgewebview2.exe"
7+
4. Search for "msedgewebview2.exe" in search box.
88
5. To find the right msedgewebview2.exe, you can use a combination of:
99
1. The "Package name" column, which will represent the application using WebView2. (you might need to right-click the column headers, choose "select columns" and check the box for "Package name")
1010
2. The "Description" column, which will describe which of WebView2's processes it is. (you might need to make Task Manager very wide to see this one, you can drag to re-arrange the columns if needed)

diagnostics/ttd.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Time Travel Debugging (TTD) is a powerful debugging tool that records comprehens
33

44
### Prerequisites
55

6-
1. Download and install TTD using this [link](https://aka.ms/ttd/download)
7-
2. After installation, the TTD command (`ttd.exe`) will be available in your system PATH
8-
3. **Important**: TTD requires administrative privileges - always run commands from an elevated command prompt
6+
1. Download and install TTD using the [Preferred Method](https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-ttd-exe-command-line-util).
7+
2. After installation, the TTD command (`ttd.exe`) will be available in your system PATH.
8+
3. **Important**: TTD requires administrative privileges - always run commands from an elevated command prompt.
99
### Collecting TTD Traces
1010

1111
#### Browser Process Tracing
@@ -14,9 +14,9 @@ Time Travel Debugging (TTD) is a powerful debugging tool that records comprehens
1414

1515
2. **Start TTD tracing** with the following command:
1616
```
17-
ttd.exe -attach <browser-pid> -dumpfull
17+
ttd.exe -attach <browser-pid>
1818
```
19-
> **Tip**: Use the `-out` parameter to specify a custom output location for the trace files
19+
> **Tip**: Use the `-out` parameter to specify a custom output location for the trace files.
2020
2121
3. **Wait for confirmation** - You should see a message indicating that tracing has started:
2222
![TTD Started](resources/ttd-started.png)
@@ -25,21 +25,21 @@ Time Travel Debugging (TTD) is a powerful debugging tool that records comprehens
2525

2626
![TTD Control Window](resources/ttd-window.png)
2727

28-
5. **Reproduce the issue** - Execute the scenario you want to debug. Note that TTD may cause slight performance degradation during recording
28+
5. **Reproduce the issue** - Execute the scenario you want to debug. Note that TTD may cause slight performance degradation during recording.
2929

30-
6. **Stop tracing** - Click the **Tracing Off** button in the control window when you've finished reproducing the issue
30+
6. **Stop tracing** - Click the **Tracing Off** button in the control window when you've finished reproducing the issue.
3131

3232
#### Renderer Process Tracing
3333

34-
For renderer process or any sandboxed process, it’s important to use the `--no-sandbox` browser argument. These are the options to set this to the setting:
34+
For renderer process or any sandboxed process, it’s important to use the `--no-sandbox` argument as sandboxing restricts debugger-level access and prevents trace recording. These are the options to set this to the setting:
3535

36-
- **Option 1**:
36+
- **Option 1: "Windows Environment Variable Update"**:
3737

3838
* Search **Edit the System environment variable** in windows search and open the window.
3939

40-
* Click on the Environment variables button and add a new entry with key: `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` and value: `--no-sandbox`
40+
* Click on the Environment variables button and add a new entry with key: `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` and value: `--no-sandbox`.
4141

42-
- **Option2**:
42+
- **Option 2: "WebView2 Utility"**:
4343

4444
* Open [WebView2 utilities](https://david-risney.github.io/WebView2Utilities/) and go to your app.
4545

@@ -50,22 +50,22 @@ For renderer process or any sandboxed process, it’s important to use the `--no
5050
2. **Find the renderer process ID** following the [steps outlined below](#finding-process-id)
5151
3. **Start TTD tracing**:
5252
```
53-
ttd.exe -attach <renderer-pid> -dumpFull
53+
ttd.exe -attach <renderer-pid>
5454
```
55-
4. **Monitor and reproduce** - The TTD control window will appear. Reproduce your scenario and click "Tracing Off" when complete
56-
5. **Security cleanup** - Remove the `--no-sandbox` argument after collecting the trace to restore normal security
55+
4. **Monitor and reproduce** - The TTD control window will appear. Reproduce your scenario and click "Tracing Off" when complete.
56+
5. **Security cleanup** - Remove the `--no-sandbox` argument after collecting the trace to restore normal security.
5757

58-
In both the cases, *.out* and *.run* will be saved to the specified location ( or in the same folder from where you are running your commands if you haven't specified anything ).
58+
In both the cases, *.out* and *.run* files will be saved to the specified location (or in the same folder from where you are running your commands if you haven't specified anything).
5959

60-
For more details on the ttd and to capture other processes., refer to this [link](https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-ttd-exe-command-line-util)
60+
For more details on the ttd and to capture other processes, refer to [Microsoft Learn](https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-ttd-exe-command-line-util)
6161

6262

63-
### Steps to find pid for a process
63+
### Steps to find PID for a process
6464

6565
- Open the Task Manager and go to Details pane.
6666

67-
- If the Details view doesn't show **Command Line** column, right click on any column and select **Select Columns**. Now add **Command Line** column to the view.
67+
- If the Details view does not show **Command Line** column, right click on any column and select **Select Columns**. Now add **Command Line** column to the view.
6868

69-
- Search for msedgewebview2.exe process and find the process which contains  “--embedded-browser-webview=1 --webview-exe-name={`app-exe-name`}” argument. Get the pid of the process
69+
- Search for the msedgewebview2.exe process and find the process which contains the  “--embedded-browser-webview=1 --webview-exe-name={`app-exe-name`}” argument. Get the PID of the process.
7070

7171
![pid-taskbar](resources/pid-taskbar.png)

0 commit comments

Comments
 (0)