Cyberiafreak

"Fortunate are those who take the first steps.” ― Paulo Coelho

Windbg config & ways to create dump

Setting up Windbg for the first time and work easily with batch file trick.

  1. Install 32 bit/62bit version of windbg from the following site http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
  2. For debugging 32 bit use x86 windbg and for 64 bit use 64 bit to avoid confusion
  3. Allow to install default under Debugging tools for windows folder under  program files folder
  4. run cmd.exe, goto: cd c:\program files\debugging tools for windows\
  5. Get the symbols downloaded, cmd> symchk.exe /q /ie myapplication.exe /s SRV*c:\websymbols\*http://msdl.microsoft.com/download/symbols;C:\progra~1\ Myapplication ~1\;  This command may take a few minutes depending on ur internet connection.
  6. Create this batch file on the user’s desktop call it WinDBG.BAT and launch this AFTER myapplication is started.

@echo on

c:\progra~1\debugg~1\adplus.vbs -quiet -crash -pn myapplication.exe -o c:\crashfolder -y c:\websymbols;c:\progra~1\ Myapplication ~1\ -NoDumpOnFirst

Note: All the logs will be in c:\crash_folder directory on your local machine the logs will be automatically time stamped

What are the various option available to capture dumps of a crashing/froozen(hang) application in Windows?

1) Adplus
2) ProcDump – memory, high cpu http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx -command utility, simple to download
3) Windbg
4) CDB -p 6088 “exe * -c2
5) RightClick task manager in Win7/2008
6) using dbdiag – http://www.microsoft.com/en-in/download/details.aspx?id=26798 ( it runs even if restart the comp also ) -rules are powerful
7) Process explorer- right click

How to load extn for .NET 4 in windbg?

Extension: http://www.microsoft.com/en-us/download/details.aspx?id=21255
PSSCOR4 http://blogs.msdn.com/b/tom/archive/2011/04/28/now-available-psscor4-debugger-extension-for-net-4-0.aspx

0:000> lmvm clr
0:000> .loadby sos clr
0:000> !pe

Few cmds: 1)  sxe av 2) sxd sv 3) sxe clr (attach to an application and run side by side) 4) sx -Com exception

Advertisements

September 15, 2012 - Posted by | windbg

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: