Sign in
Mike Stall's .NET Debugging Blog
Notes on Managed Debugging, ICorDebug, and random .NET stuff
Blog - Link List
Other Blogs
Tim's .NET blog
Energy Policy
CLR blogs
Rick Byers (CLR)
List of all CLR blogs
David Broman (Profiling)
Thomas Lai's blog
Other links
All about MDbg
What's new in v2.0?
Who am I?
ICorDebug/MDbg Forums
Contact me?
ASP.Net
ScottGu's blog
Henrik's blog
Brad Wilon's blog
Carlos Figueira's blog
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
RSS for posts
Atom
RSS for comments
OK
Search
Tags
Compilers & Languages
Design
dlr
Edit-And-Continue (EnC)
Family
feedback
FuncEval
ICorDebug
Interop (mixed-mode)
linkfest
MDbg
Non-work
Pages
Quiz
Random
random .net
reading
Sample Code
Silverlight
This should be in MSDN
Troubleshooting
versioning
WebAPI
Whidbey (V2.0)
Windows Live
Archive
Archives
August 2012
(2)
May 2012
(3)
April 2012
(5)
March 2012
(2)
November 2011
(1)
September 2011
(1)
December 2010
(1)
September 2009
(2)
July 2009
(1)
May 2009
(1)
February 2009
(1)
November 2008
(1)
June 2008
(1)
May 2008
(2)
April 2008
(3)
March 2008
(5)
February 2008
(2)
January 2008
(10)
December 2007
(7)
November 2007
(5)
October 2007
(16)
September 2007
(8)
August 2007
(12)
July 2007
(9)
June 2007
(5)
May 2007
(7)
April 2007
(4)
March 2007
(6)
February 2007
(5)
January 2007
(11)
December 2006
(9)
November 2006
(13)
October 2006
(9)
September 2006
(10)
August 2006
(6)
July 2006
(13)
June 2006
(10)
May 2006
(3)
April 2006
(4)
March 2006
(31)
February 2006
(16)
January 2006
(18)
December 2005
(11)
November 2005
(23)
October 2005
(12)
September 2005
(22)
August 2005
(31)
July 2005
(10)
June 2005
(7)
May 2005
(4)
April 2005
(5)
March 2005
(9)
February 2005
(16)
January 2005
(6)
December 2004
(3)
November 2004
(4)
October 2004
(14)
September 2004
(2)
MSDN Blogs
>
Mike Stall's .NET Debugging Blog
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Mike Stall's .NET Debugging Blog
How WebAPI does Parameter Binding
Posted
over 1 year ago
by
Mike Stall - MSFT
9
Comments
Here’s an overview of how WebAPI binds parameters to an action method. I’ll describe how parameters can be read, the set of rules that determine which technique is used, and then provide some examples. [ update ] Parameter binding is ultimately...
Mike Stall's .NET Debugging Blog
Managed Debugger Sample
Posted
over 9 years ago
by
Mike Stall - MSFT
61
Comments
We have a pure C#/IL managed debugger sample, called MDbg. It's available on MSDN at http://www.microsoft.com/downloads/details.aspx?familyid=38449a42-6b7a-4e28-80ce-c55645ab1310&displaylang=en . For a variety of reasons, this sample only runs on...
Mike Stall's .NET Debugging Blog
Source for a C# compiler written in pure C#.
Posted
over 8 years ago
by
Mike Stall - MSFT
48
Comments
For anybody looking for the full source to a bootstrapping C# compiler, today’s your lucky day. A while ago (back in 2001 before we shipped v1.0), I wrote a C# compiler called “Blue”. I know it’s 3.5 years after I wrote it, but I figured releasing it...
Mike Stall's .NET Debugging Blog
Rules of Funceval
Posted
over 8 years ago
by
Mike Stall - MSFT
8
Comments
Funceval (aka "Function Evaluation" or "Property Evaluation") is the ability to inject some arbitrary call while the debuggee is stopped somewhere. A debugger commonly uses funceval to run ToString() and property getters. I want to describe when it is...
Mike Stall's .NET Debugging Blog
Tool to allow inline IL in C# / VB.Net
Posted
over 8 years ago
by
Mike Stall - MSFT
32
Comments
C# doesn’t support inline IL. As an experiment, I wrote a post-compiler tool that allows primitive IL inlining for C# / VB.Net (or any .net language). (My main goal here was I actually wanted to try out fxcop and needed some pet project to do it with...
Mike Stall's .NET Debugging Blog
MDbg Linkfest
Posted
over 8 years ago
by
Mike Stall - MSFT
11
Comments
MDbg is a debugger for managed code written entirely in C# (and IL), which started shipping in the CLR 2.0 SDK. I have so many MDbg posts, that I'm losing track of them. And others have had some good posts too. For my own organization, I need to create...
Mike Stall's .NET Debugging Blog
Why you sometimes get a bogus ContextSwitchDeadLock MDA under the debugger
Posted
over 8 years ago
by
Mike Stall - MSFT
1
Comments
The ContextSwitchDeadLock MDA (I blogged about MDAs here ) sometimes fires under the debugger. MSDN says: It is possible for this MDA to be falsely activated when all of the following conditions are met: * An application creates COM components from...
Mike Stall's .NET Debugging Blog
What's new in v2.0 CLR Debugging (ICorDebug)?
Posted
over 8 years ago
by
Mike Stall - MSFT
18
Comments
The CLR debugging services have added a lot of great things in v2.0. The main theme for us has been improving the Rapid Application Development (RAD) experience. Here’s a list of new features: 1) Edit-And-Continue . EnC is the ablity to edit code while...
Mike Stall's .NET Debugging Blog
Writing an RTF to HTML converter, posting code in blogs.
Posted
over 7 years ago
by
Mike Stall - MSFT
12
Comments
Visual Studio's IDE will copy code as RTF (Rich Text Format). Web browsers like HTML. So posting code from Visual into blogs means a decent RTF to HTML conversion. And having a technical blog means posting code. So I needed to solve this conversion problem...
Mike Stall's .NET Debugging Blog
Debugging Dynamically Generated Code (Reflection.Emit)
Posted
over 8 years ago
by
Mike Stall - MSFT
27
Comments
The CLR supports the ability to generate code at runtime (Reflection.Emit). This is great for the many dynamic languages targeting the runtime (such as Iron Python ). We also support that ability to provide debugging information for that code so that...
Mike Stall's .NET Debugging Blog
Caveats about System.Diagnostics.StackTrace
Posted
over 8 years ago
by
Mike Stall - MSFT
16
Comments
The .Net frameworks provides the System.Diagnostics.StackTrace class which allows you to get a stack trace at runtime. This can be handy for diagnostic purposes such as implementing an assert dialog. However, beware of the following about the StackTrace...
Mike Stall's .NET Debugging Blog
How to embed IronPython script support in your existing app in 10 easy steps
Posted
over 8 years ago
by
Mike Stall - MSFT
17
Comments
Previously , I added IronPython scripting support to a real existing application, MDbg (a managed debugger written in C#). In this entry, I'll go through step-by-step how I did that. I'll call specific attention to the goofy issues so that it should be...
Mike Stall's .NET Debugging Blog
Check out CLR Profiler 2.0
Posted
over 8 years ago
by
Mike Stall - MSFT
2
Comments
FYI, in case you haven't heard from everybody else saying the same thing a month earlier, CLR Profiler for .NET 2.0 is available for free download here: http://www.microsoft.com/downloads/details.aspx?FamilyId=A362781C-3870-43BE-8926-862B40AA0CD0&displaylang...
Mike Stall's .NET Debugging Blog
Using CreateRemoteThread from C#
Posted
over 7 years ago
by
Mike Stall - MSFT
6
Comments
If you want to create a new thread in your process in C#, you can use Thread.Start . But things are a little harder if you want to create a thread in another process, ala kernel32!CreateRemoteThread . Disclaimer : CreateRemoteThread is evil, could dead...
Mike Stall's .NET Debugging Blog
How can I debug Just My Code?
Posted
over 9 years ago
by
Mike Stall - MSFT
27
Comments
Sometimes developers want to debug just the code they wrote and not the 3 rd -party code (such as framework and libraries) that’s also inside their app. This becomes particularly useful when user and non-user code call back and forth between each other...
Mike Stall's .NET Debugging Blog
Source is available for MDbg Winforms GUI!
Posted
over 8 years ago
by
Mike Stall - MSFT
21
Comments
The source for the Winforms GUI extension to MDbg is now available as a sample. (Sorry it took so long). The download is available here . I’ve also updated the original post with this link. Here's a screenshot of the updated gui:
Mike Stall's .NET Debugging Blog
Converting a managed PDB into a XML file.
Posted
over 8 years ago
by
Mike Stall - MSFT
11
Comments
I wrote some C# sample code to get an ISymbolReader from a managed PDB (Program Database) file and then dump it back out as XML. The managed PDB stores all the source-level debugging information such as: - the mapping between IL offsets and source lines...
Mike Stall's .NET Debugging Blog
Finding where unmanaged exceptions came from
Posted
over 8 years ago
by
Mike Stall - MSFT
26
Comments
Sometimes you’re looking at the callstack that’s in a handler after an exception was thrown. This is very common if you attached at an unhandled exception that popped up a watson dialog. It might look this like: kernel32!WaitForSingleObject+0xf devenv...
Mike Stall's .NET Debugging Blog
Viewing types with Reflection-Only
Posted
over 7 years ago
by
Mike Stall - MSFT
5
Comments
It's natural for a tool to use Reflection-Only loading to load an assembly and view the types in it. For example, I used this in my pdb2xml tool. However, I missed an important detail that I wanted to warn you about after getting it wrong myself. Consider...
Mike Stall's .NET Debugging Blog
How to start a console app in a new window, the parent's window, or no window
Posted
over 7 years ago
by
Mike Stall - MSFT
4
Comments
The ProcessStartInfo.CreateNoWindow property says "Gets or sets a value indicating whether to start the process in a new window." and later " true to start the process without creating a new window to contain it; otherwise, false . The default is false...
Mike Stall's .NET Debugging Blog
Managed Debug Assistants (MDAs) are cool.
Posted
over 8 years ago
by
Mike Stall - MSFT
10
Comments
Whidbey has has added Manage Debug Assistants (MDAs), which are like advanced log messages for diagnostic information. These things are awesome. There appears to be very little written about them. You can enable them in the VS exception dialog. You can...
Mike Stall's .NET Debugging Blog
Passing Property values by reference
Posted
over 7 years ago
by
Mike Stall - MSFT
16
Comments
I was wondering how well properties were integrated into C#. For example, C# lets you use += with the properties. It's easy enough to convert: MyProperty += 4 to MyProperty = MyProperty + 4 However, C# won't let you pass a property in as a ref parameter...
Mike Stall's .NET Debugging Blog
Debugging IL
Posted
over 9 years ago
by
Mike Stall - MSFT
25
Comments
Managed applications are compiled to IL (Intermediate Language) and then our JIT (Just-In-Time compiler) can compile it to native code so that the CPU can execute it. (The alternative is interpreting the IL directly, which has horrible performance characteristics...
Mike Stall's .NET Debugging Blog
Introductions, ICorDebug + CLR Debugging Services
Posted
over 9 years ago
by
Mike Stall - MSFT
4
Comments
My name is Mike Stall, and I'm a developer on the CLR (also called the .NET runtime and a host of other names). I currently work on the CLR Debugging Services along with some other folks. We design and implement the managed debugging API exposed by the...
Mike Stall's .NET Debugging Blog
Winforms gui on top of Managed debugger sample.
Posted
over 9 years ago
by
Mike Stall - MSFT
11
Comments
UPDATE: The source for this sample is now available here . Since this post is closed (it's from Nov 2004), please direct comments to this post . The MDbg sample ships with some interesting extensions, including a simple winforms gui with some very basic...
Page 1 of 19 (454 items)
1
2
3
4
5
»