How to collect a WinDbg dump of a Visual Studio crash
Install WinDbg
Run winget install Microsoft.WinDbg, or follow the steps in Install WinDbg from Microsoft.
Record a crash log
- Create the
C:\logs\andC:\dump\folders. - Start Visual Studio.
- Start WinDbg.
- Press F6 and attach to the
devenv.exeprocess. - Enter these commands one by one:
sxd av .logopen /t c:\logs\Output.txt - Press F5 to resume Visual Studio.
- Reproduce the crash.
- When Visual Studio crashes, enter these commands one by one:
.loadby sos clr !PrintException !ClrStack ~* e !ClrStack ~* k - Enter
.logcloseto save the log. The log file is inC:\logs\, and its name starts withOutput.
Save a dump file
If JetBrains support asks for a dump file, enter one of these commands after step 8.
For a mini dump:
.dump /mdhiptu c:\dump\windbg_crash_dump.dmp
For a full dump:
.dump /map c:\dump\windbg_crash_fulldump.dmp
Send the files
Upload the log file, the dump file, and sos.dll from your machine to uploads.jetbrains.com, then share the Upload ID with JetBrains support. For Visual Studio 2022 and later, sos.dll is in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\. For Visual Studio 2019 and earlier, it is in C:\Windows\Microsoft.NET\Framework\v4.0.30319\.
For more details, see Uploading Large Files for JetBrains Support Team.
Please sign in to leave a comment.
"start "windbg x86" executable file"
How would I do that?
To get WinDbg, you have to install WDK from Microsoft.
You can download wdksetup.exe from here: https://go.microsoft.com/fwlink/p/?LinkId=845980
Whenever I try to follow the steps:
0:065> .logopen /t c:\logs\Output.txt
Log file could not be opened
Is that normal? After following steps, no log file is provided
0:065> .logopen /t c:\logs\Output.txt
Log file could not be opened
Is that normal? After following steps, no log file is provided
Probably the reason in why the logopen command is failing is basic you don't the need directory created. In this case, the directory is called logs. Had the same problem, I simply resolved it using the following command (.logopen /t c:\output.txt)
Enter following commands:
"enter the following commands:
"
Enter them where?
Summary of this Thread