I am using Visual Studio 2010 Professional Edition and Windows Vista.
First off, I have this code. As you can see, this will crash the program!
using System; namespace Crash { class Program { static void Main(string[] args) { string a = null; if (a.Length == 12) {
The program will crash in the if statement. Now I want to know that he collapsed on this if statement.
If I run without debugging from Visual Studio, Crash.exe fails. It uses 1.356 KB of memory. I get the Vista Close Program / Debug option. If I select Debug, I can open a new instance of Visual Studio, and it points me to a NullReferenceException in the if statement. It's good.
Now let me assume that it crashes on another computer, and I force them to give me a dump file through the task manager. This is 54,567kb. Why so big! It's simple! Anyway, I'm less interested in (slightly)
If I open this dump with Windbg, I get very little benefit from my unprepared eye:
Microsoft (R) Windows Debugger Version 6.12.0002.633 X86 Copyright (c) Microsoft Corporation. All rights reserved. Loading Dump File [C:\Users\Richard\Desktop\Crash.DMP] User Mini Dump File with Full Memory: Only application data is available Symbol search path is: SRV*C:\SYMBOLS*http://msdl.microsoft.com/download/symbols Executable search path is: Windows Server 2008/Windows Vista Version 6002 (Service Pack 2) MP (4 procs) Free x86 compatible Product: WinNt, suite: SingleUserTS Personal Machine Name: Debug session time: Sat Jan 15 11:07:36.000 2011 (UTC + 0:00) System Uptime: 0 days 4:24:57.783 Process Uptime: 0 days 0:00:05.000 ........................ eax=002afd40 ebx=77afa6b4 ecx=002afd48 edx=00000001 esi=001cdaa4 edi=00000000 eip=77bf5e74 esp=001cda5c ebp=001cdacc iopl=0 nv up ei ng nz ac pe cy cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000297 ntdll!KiFastSystemCallRet: 77bf5e74 c3 ret
However, this does not interest me. As far as I can tell, I need to write commands to get useful output, and Visual Studio is better.
So I open it with Visual Studio. I can choose "Debug with Native Only", but I get a lot of things that mean something smart people like you, and I'm not smart! I get these two screens:


So my question is:
How to show Visual Studio source code?
Also, is there a way to get a smaller dump file? It seems ridiculously large, even after squeezing. I donβt understand why there cannot be one that will be just a little bigger than the size of the program, and still get good debugging with the source code.