Links:
- goto WDK and WinDbg downloads
- scroll down to
Standalone Debugging Tools for Windows (WinDbg)
Get the standalone debugging tools (WinDbg) as part of Windows 8.1 SDK
- execute
sdksetup.exe
- just select
Debugging Tools for Windows
- install
- Start -> All Programs -> Windows Kits -> Debugging Tools for Windows (x64) -> WinDbg (x64)
- File -> Open -> Executable:
- File name:
C:\Program Files\mapbox-studio\resources\app\vendor\node.exe
- Arguments:
"C:\Program Files\mapbox-studio\resources\app\index.js"
- check
Debug child processes also
- File name:
- Check in Task Manager that there is only one instance of
node.exe
- Enter commands one at a time on the prompt at the bottom
.sympath SRV*C:\debugsymbols*http://msdl.microsoft.com/download/symbols
.symfix+ c:\debugsymbols
!sym noisy
.reload /f
- wait till
*BUSY*
at the bottom left disappears - Enter commands one at a time on the prompt at the bottom
.logopen /t c:\mbslog\log.txt
.childdbg 1
.tlist
|* lm
- now run mbs by: Debug -> Go
If you see an exception in the WinDbg command window that says ntdll32!LdrpDoDebuggerBreak+0x2c
or ntdll32!LdrpDoDebuggerBreak+0x30
, enter those commands:
bp ntdll!LdrpDoDebuggerBreak+0x30
bp ntdll!LdrpDoDebuggerBreak+0x2c
eb ntdll!LdrpDoDebuggerBreak+0x30 0x90
eb ntdll!LdrpDoDebuggerBreak+0x2c 0x90
----
To continue click: Debug -> Go
- open your browser at
http://localhost:3000
- reproduce crash
- Enter commands:
!peb
.reload /f
!teb
|* ~* kp
|* !analyze -v -f
|* lm
- Create a dump file (might take some time):
.dump /ma c:\mbslog\mbs-crash.dmp
- exit WinDbg
- the
DMP
files can be huge, but they compress really well with 7z (www.7-zip.org) and compression set toUltra
. - send log and 7-zipped dump files from
c:\mbslog\
to developer, who pointed you to this gist
- Point Symbol path for code .pdb files
- Example: .sympath D:\MyAspNetcode\bin;cache*;SRV*https://msdl.microsoft.com/download/symbols;C:\ProgramData\Dbg\sym\kernelbase.pdb\E4F19BFB5CC054D7E381DBC8D97493691
- Add SOS.dll to WinDBG understand .Net
- .load D:\PATH\sos.dll
- SOS.dll was found on .Net framework folder
- Adding CoreClr (Not real understand, but needed)
- .cordll -I coreclr.dll -N -ve
- !peb - Show "Dump machine" system information.
- !runaway - Show what is running on the "Dump time".
- ~s - Go focus on thread number. Command example: ~4s, moves to thread 4.
- kb - On thread, this command show the Stack was running on the moment.
- .sympath - Add references to new Symbol path, used when work with nom C code.
- !clrstack - Show Dotnet Stack
- !ip2md - Detail to point of Memory (ip2md = internal point to memory definition). Ex: "!ip2md 00007ffe4ec4910"
###General
- Common WinDbg Commands
- How do I make a '.cmdtree' window dock at startup in WinDbg?
- What is your favourite Windbg tip/trick?
- Special Command—Execute Commands from a Customized User Interface with .cmdtree
- How to get a stacktrace with WinDbg
- Using the Mozilla symbol server
- How to get the stack when 'k' tells you 'Stack unwind information not available. Following frames may be wrong
- Reconstructing a Corrupted Stack Crawl
- Debug Tutorial Part 2: The Stack
!address -summary -> build memory map
!heap -s -> heap summary
!heap -stat -h 0 -> allocation statistics
!heap -srch [Size] <pattern> -> scan all heap for pattern
!heap -flt s <obj-size> -> filter heap by object size
filter all loaded modules by object size:
!for_each_module ".echo @#ModuleName;dt -v -s <obj-size> ${@#ModuleName}!*"