Geeks With Blogs

News



Microsoft Store

Support This Site


AddThis Social Bookmark Button

Locations of visitors to this page

Subscribers to this feed

TwitterCounter for @sdorman

Creative Commons License


Scott Dorman ephemeral segment Debugging There are 14 entries for the tag Debugging
Premature optimization is the root of all evil
I’ve lost count how many times I’ve heard that quote. It’s a great quote said by one of the leading minds in computer programming and formal mathematics, Donald Knuth. The problem with this quote is that, like so many other things, people have only remembered (or only quote) a small portion of the entire thing. To read the full quote, you need to look at a paper published in December 1974 titled Structured Programming with go to Statements in Computing Surveys. The full quote is this (in reference ......

Posted On Friday, August 28, 2009 10:24 PM

Visual Studio 2008 Debugging – The Watch Window
The Watch window (actually there are four different Watch windows you can use) is easily the most powerful aspect of the Visual Studio debugger and the underlying technology it uses actually surfaces in several places: Watch Autos Locals Quick Watch “Data Tips” (the debugging tool tips that appear when you hover over a code element) The thing that most people might not realize is that you can actually call methods in the Watch window. This is useful because it allows you to see data structures that ......

Posted On Saturday, February 14, 2009 8:23 PM

Visual Studio 2008 Debugging – Advanced Tricks
We previously talked about the Location, Condition, Hit Count, Filter, and When Hit modifiers for breakpoints. These are great advanced breakpoints that will really make your debug sessions much more useful, but there are also some other advances in Visual Studio that go beyond these breakpoint modifiers. The first advance is the idea of advanced location breakpoints. How many times have you been debugging an issue and as you’re looking at the call stack you realize that you want to set a breakpoint ......

Posted On Saturday, February 14, 2009 6:45 PM

Visual Studio 2008 Debugging Tricks – Tracepoints
We have talked about the Location, Condition, Hit Count, and Filter modifiers for breakpoints which only leaves the When Hit modifier. Using the When Hit modifier allows you to change your breakpoint to a tracepoint. What is a tracepoint? Simply put, it is a breakpoint that continues execution. Why would this be interesting or even important? Tracepoints are great when you want to trace a particular path of execution, such as OnDeserialized events in your WCF DataContract classes. You are interested ......

Posted On Saturday, February 14, 2009 4:17 PM

Visual Studio 2008 Debugging Tricks – Multi-Threaded Debugging
We previously talked about the Location, Condition and Hit Count modifiers for advanced breakpoints. These are great for a lot of different debugging scenarios, but what about tricks specifically for debugging multi-threaded applications. If you have ever tried to debug a multi-threaded application you know that it isn’t always the easiest experience. Hopefully everyone is already familiar with the Treads window. If you aren’t, it is accessed through the Debug|Windows|Threads menu or the Ctrl+D, ......

Posted On Saturday, February 14, 2009 4:16 PM

Visual Studio 2008 Debugging Tricks – Advanced Breakpoints
The most basic aspect of any debugging session is the use of breakpoints, which allows you to specify a location in your application (a line of code) where program execution will stop (break) and allow you to inspect the internal state of the application at that exact moment. This is a pretty cool feature, but Visual Studio allows you to do even more with advanced breakpoints. Put simply, an advanced breakpoint is a breakpoint with one or more modifiers applied. A modifier allows you to change the ......

Posted On Saturday, February 14, 2009 4:16 PM

CLR 4.0: Native-Managed Interoperability Improvements
Exposing a native application to a managed application hasn’t always been the easiest experience. The good news is that there are some significant improvements in the interoperability story between native and managed code. In the current versions of the .NET Framework, the process starts with running the tlbimp tool to create an interop assembly. The problem here is that tlbimp doesn’t always get everything right so you have to fix the assembly by running ildasm and then hand modify the IL or write ......

Posted On Monday, November 10, 2008 11:20 AM

CLR 4.0: Debugging Improvements
Debugging in .NET 4.0 has become a bit easier as well thanks to better support for dump debugging through Visual Studio. This means that dump debugging now has support via ICorDebug, which is the same API that is used to enable live debugging and will also allow you to debug Windows Error Reporting mini-dumps in Visual Studio. If you develop 64-bit applications, 64-bit mixed-mode debugging now supports both live and dump debugging. There are also new APIs to do lock inspection, which allows you to ......

Posted On Friday, November 7, 2008 3:05 PM

.NET Memory Management – Resources
I present at a lot of the local Florida code camps (and some out of state ones as well) and have a set of presentations that I do which focus on .NET memory management, specifically a "deep dive" on how the GC works and another presentation which talks about how to implement the Dispose pattern properly. I was doing some additional research today to update my list of resources in the presentations and decided to publish that list here as well. This is not an exhaustive list, but it is a subset of ......

Posted On Sunday, September 14, 2008 4:16 PM

Debugging Finalizers
For the last few years, I've tried to make more .NET developers aware of the IDisposable interface, the Dispose pattern, and the importance of having at least a basic understanding of how the Garbage Collector works. I have one article on The Code Project and various blog posts (see here, here, here, or here) that talk about these topics. I have also presented an advanced Memory Management presentation at various Code Camps. In the November 2007 issue of MSDN Magazine, Stephen Toub presents a solution ......

Posted On Thursday, October 25, 2007 10:24 PM

.NET Framework Library Source Code
I'm sure most of you are familiar with Reflector. If you're not you should download it immediately and become familiar with it. It is an invaluable tool for looking at .NET assemblies and decompiling them to C#, Visual Basic or even IL. I have used both Reflector and Rotor extensively to investigate how the .NET runtime is actually doing things. I have done this for various reasons, including trying to track down bugs in my code. Why would I need to look at what the runtime is doing to find a bug ......

Posted On Friday, October 5, 2007 12:00 AM

.NET 3.5 changes to GC.Collect
During my talk on Garbage Collection in .NET at the Jacksonville Code Camp 2007, Joe Healy mentioned that I should take a look at the changes made to the GC in the .NET Framework 3.5 release. (This is based on the Beta 2 release, but it should be pretty stable at this point.) After doing some research using the SSCLI 2.0 code base to look at the GC class as it exists in .NET 2.0 and Reflector to look at it in .NET 3.5, I found the single change that was made. (For those of you wondering why I used ......

Posted On Sunday, August 26, 2007 11:27 AM

Debugging in Visual Studio 2005 with a Symbol Server
We have all had the experience of debugging an application in Visual Studio and run into the problem of not having the debugging symbols or having incorrect symbols. This is particularly true when you need to step into .NET CLR code to track down a problem. Microsoft maintains a public symbol server that provides symbols for the different Windows operating system versions, MDAC, IIS, ISA, and the .NET Framework. This server is for symbol downloads only and is not browseable. In addition to the Microsoft ......

Posted On Wednesday, May 23, 2007 4:21 PM

Windows Vista: Kernel Changes - Cycle Times, Class Schedulers and Synchronization
Cycle Time Counter Prior to Vista, the kernel accounted for CPU time based on the interval clock timer which had a resolution of between 10-15ms. This timing interval was not always fair or accurate since threads where charged for interrupts that occurred while they were running and a thread might not get a turn to execute or could get up to three turns to execute. Vista changes this timing mechanism by reading the Time Stamp Counter (TSC) at each context switch. This allows the CPU to charge the ......

Posted On Saturday, June 17, 2006 3:08 PM

Copyright © Scott Dorman | Powered by: GeeksWithBlogs.net | Join free