Debugging

TwitterFacebook
Get flash to fully experience Pearltrees
.Net

It's finally here - the launch of the .NET Reference Source project. This post (hopefully!) contains everything you need to know.

Configuring Visual Studio to Debug .NET Framework Source Code - Shawn Burke's Blog

http://blogs.msdn.com/b/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx
Practical .NET Insider: Secrets of Debugging

Insider: Secrets of Debugging

http://visualstudiomagazine.com/articles/2011/07/15/wcnet_insider-debugging.aspx

Memory Leak - Trouble figuring out with windbg.exe what causes the memory leak

Code Snippet public class HideSidePanelButton : ImageButton public HideSidePanelButton() : base () base . ToolTip = Properties . http://www.netframeworkdev.com/common-language-runtime/memory-leak--trouble-figuring-out-with-windbgexe-what-causes-the-memory-leak-35888.shtml
http://msdn.microsoft.com/en-us/library/ff537961(v=vs.85).aspx ADPlus uses the following syntax. The command is parsed from left to right.

ADPlus Command-Line Options

How to use ADPlus to troubleshoot "hangs" and "crashes"

System requirements ADPlus has the following minimum requirements: Windows NT 4.0 Service Pack 4 or later Windows Scripting Host version 5.6 or later At least 10 megabytes (MB) of free space on the disk or network share where ADPlus will put the output files Microsoft Debugging Tools for Windows installed Where do you obtain ADPlus? http://support.microsoft.com/kb/286350
http://naveensrinivasan.com/2010/04/03/undocumented-psscor2-functions/ With the latest release of PSSCOR2 release from Microsoft comes with a set Undocumented functions. FYI PSSCOR2 is a superset of sos.dll for .NET framework 2.0/3.5, it also has bunch of functions which are available in the .NET 4.0 sos.dll. The .NET 4.0 also has few undocumented functions and PSSCOR2 does have them. But these functions are totally new and is not even available in .NET 4.0 sos !

Undocumented PSSCOR2 functions « Naveen's Blog

http://blog.coryfoy.com/2010/04/first-look-at-psscor2-the-new-windbg-debugging-extension-for-managed-code/ About two weeks ago Microsoft announced the release of Psscor2 – a managed debugging extension for WinDBG which is a superset of the awesome SOS debugging extension. This is an insanely useful tool when you are trying to debug problems on Production machines where you don’t (and can’t) install Visual Studio, or when you need a deeper understanding of what is going on with your managed code. While there are several articles listing out the commands and a detailed command help view , there isn’t much else.

First Look at Psscor2 the new WinDBG Debugging Extension for Managed Code | Cory Foy

Getting full user mode dumps automatically when your process crashes - If broken it is, fix it you should

I recently got a question about if it is possible to generate full user mode dumps automatically every time the process crashes (without having debug diag or adplus installed and monitoring your system). This would be useful for example if you are setting up a site, and you want to make sure you get dumps if it ever crashes so that you don’t have to repro the issue at that point, just to get data. It turns out that starting with Windows Server 2008 and Vista + SP1, Windows Error Reporting (WER) will let you do just that. http://blogs.msdn.com/b/tess/archive/2010/08/23/getting-full-user-mode-dumps-automatically-when-your-process-crashes.aspx
http://www.eggheadcafe.com/articles/20060114.asp

Investigating ASP.Net Memory Issues using WinDbg and SOS

Output for the baddapp domain (abbreviated): Domain: 0x18bb68 LowFrequencyHeap: 0x0018bbcc HighFrequencyHeap: 0x0018bc24 StubHeap: 0x0018bc7c Name: /LM/w3svc/1/root/BadApp-1-127813414066093750 Assembly: 0x0018a248 [System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] ClassLoader: 0x0017e5e8 Module Name 0x001c9b80 c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll Assembly: 0x001a9088 [System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] ClassLoader: 0x0018abf8 Module Name 0x0018c8c8 c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll Assembly: 0x0022b990 [qa-y3re_] ClassLoader: 0x001e50a8 Module Name 0x0014c520 c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\badapp\141137f0\f42dfee7\qa-y3re_.dll
http://blogs.msdn.com/b/webtopics/archive/2009/05/22/troubleshooting-system.outofmemoryexceptions-in-asp.net.aspx When the .NET Framework was first released, many developers believed the introduction of the garbage collector meant never having to worry about memory management ever again. In fact, while the garbage collector is efficient in managing memory in a managed application, it's still possible for an application's design to cause memory problems. One of the more common issues we see regarding memory involves System.OutOfMemoryExceptions. After years of helping developers troubleshoot OutOfMemoryExceptions, we've accumulated a short list of the more common causes of these exceptions. Before I go over that list, it's important to first understand the cause of an OutOfMemoryException from a 30,000 foot view. A 32-bit operating system can address 4GB of virtual address space, regardless of the amount of physical memory that is installed in the box.

Troubleshooting System.OutOfMemoryExceptions in ASP.NET - WebTopics

Forthcoming Webinar on Philosophy of Software Diagnostics 2013 - The Year of Software Diagnostics Accelerated Memory Dump Analysis Training Sponsored link: Memory Dump Analysis Services

Crash Dump Analysis » Blog Archive » Crash Dump Analysis Checklist

Visual Studio » Advanced .NET Debugging

Did you know that you can use SOS from within Visual Studio 2005, not just from WinDbg?

Not reproducible Windows Forms Hang - If your application has hung once it will hang again | Debugging + Random Stuff

Problem Description At one of our customer site, windows forms business application hung for a business user. This issue occurred only on one machine out of 100s of users. The way we look at it is, If your application has hung once on any machine that means it will hang again, so I volunteered to look into his machine armed with WinDBG. Note
One of the synchronization methods in .NET is the ResetEvent. It comes in two flavors, the AutoResetEvent which resets itself immediately after it is set, and the ManualResetEvent which as the name suggests you have to manually reset. Lets say you have a team of developers that can implement different parts of an application simultaneously without interaction, then the work order might look something like this Ask Bob to implement X Ask Belinda to implement Y Ask Ben to implement Z Integrate X, Y and Z when you get a notification that they are done with their work

ASP.NET Case Study: Hang on WaitOne, WaitAny or WaitMultiple - If broken it is, fix it you should

Hi Tess, Periodically we see the worker process (w3wp.exe) get into a state that suggests that it is hanging (ASP.NET 1.1 web service).

.NET Hang Debugging Walkthrough - If broken it is, fix it you should