Skip to content

Commit e4baa52

Browse files
authored
Create diagnostics.md
Add a diagnostics file with basic common instructions for gathering logs and data. This will enable us to easily link to steps for external customers.
1 parent aafc24c commit e4baa52

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

diagnostics.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
This file goes over some common steps for gathering more information to help us look into issues you may be facing with the WebView2 controls.
2+
3+
## Crash Dumps
4+
If a crash occurs, the dumps can usually be found in the app's user data folder:
5+
<code><user data folder>\EBWebView\Crashpad\reports</code>
6+
The <user data folder> is created in the app's folder by default:
7+
<code><app folder>\<app name>.exe.WebView2</code>
8+
But apps can specify different user data folders. If they do, they generally know where it is.
9+
10+
## Traces
11+
Sometimes issues don't cause a crash, but something still doesn't behave as expected. Or perhaps it manifest as bad performance, slow loading, etc. In these cases you can ask for traces that can be examined.
12+
13+
### Collecting TTD traces from customer environment
14+
Some issues are reproducible only in customer environment and require a TTD trace from that environment. The instructions below might need to be re-tried until a successful trace is collected.
15+
> Cmd windows (A) and (B) can be the same, but if so, the window needs to be started as admin from the beginning.
16+
17+
1. Force `--no-sandbox` for renderer processes (collecting traces for renderer processes requires this flag)
18+
**Option (1)** - From cmd (A):
19+
> SET WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--no-sandbox
20+
SET WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS
21+
22+
**Option (2)** - From settings:
23+
Edit system environment variables / Environment variables… / New…
24+
Make sure to click "OK" on both settings windows.
25+
26+
1. Create directory for dumps
27+
Make sure it's not in a network location (network locations have paths starting with `\\`)
28+
29+
1. Start trace recording
30+
Launch admin cmd (B), then run
31+
```
32+
tttracer -bg -dumpFull -parent * -onlaunch msedgewebview2.exe -out <dumps-dir>
33+
```
34+
**Note:** this is the external version of `tttrace` in `C:\Windows\System32` which ships with Windows. No additional setup should be required to use it.
35+
36+
1. Reproduce the issue
37+
* If option (1) was used on step (1) above, make sure the launching app is restarted.
38+
* If option (2) was used on step (1) above, launch the app from the same cmd window (A) where the environment variable was set.
39+
40+
1. Stop trace recording
41+
```
42+
tttracer /stop all
43+
tttracer /cleanup
44+
tttracer /delete all
45+
```
46+
47+
* Verify collected trace hits the issue. If it doesn't, go through steps 2-5 again (use a different directory for step 3). Retries might be faster.
48+
* Send all files in successful trace dumps directory for analysis.
49+
50+
## Graphics and GPU info
51+
Issues where the WebView2 isn't displaying anything are most often caused by a launch failure, such as un-writeable user data folder, mismatched DPI awareness, or missing files (runtime or binaries). However, if the WebView2 has launched correctly (you can check return values and task manager) but the content is not there, then it might be due to a hosting and/or GPU driver issue.
52+
1. Get the output of `edge://gpu` (wait for the page to load the 'log messages' section at the bottom).
53+
1. Get a trace (instructions above)
54+
1. Get DirectX diagnostic info
55+
1. Run `dxdiag` from a console window
56+
1. Once the dialog displays and is done capturing info (small progress bar) hit the **Save All Information** button to save the info to a dxdiag.txt file
57+
1. Share the `dxdiag.txt` file
58+
59+
## Network Logs
60+
https://textslashplain.com/2020/01/17/capture-network-logs-from-edge-and-chrome/
61+
https://textslashplain.com/2020/04/08/analyzing-network-traffic-logs-netlog-json/
62+
https://dev.chromium.org/for-testers/providing-network-details
63+
64+
Can also get traces:
65+
Navigate to `about:tracing`and use with the `Edge developer (navigation)` profile
66+
67+
## Installer / Setup Logs
68+
1. **Export the EdgeUpdate Key to a reg file via regedit**
69+
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate
70+
1. **Edge Update and installer logs**
71+
C:\ProgramData\Microsoft\EdgeUpdate\Log\MicrosoftEdgeUpdate.log
72+
C:\Windows\Temp\msedge_installer.log
73+
1. **Grab all the files on disk for Edge** - the below command will do the trick and create edgefiles.txt
74+
dir /s /b "c:\Program Files (x86)\Microsoft\EdgeWebView\" > edgefiles.txt

0 commit comments

Comments
 (0)