Welcome to MSDN Blogs
Sign in
|
Join
|
Help
Mike Stall's .NET Debugging Blog
Notes on Managed Debugging, ICorDebug, and random .NET stuff
This Blog
Syndication
RSS 2.0
Atom 1.0
Search
Go
Tags
binary_diff
Compilers & Languages
Design
dlr
Edit-And-Continue (EnC)
Family
feedback
FuncEval
ICorDebug
Interop (mixed-mode)
interview
linkfest
MDbg
Non-work
Quiz
Random
random .net
reading
Sample Code
Silverlight
Testing
This should be in MSDN
Troubleshooting
versioning
Whidbey (V2.0)
Windows Live
wishlist
Archives
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 (10)
December 2006 (9)
November 2006 (13)
October 2006 (9)
September 2006 (9)
August 2006 (6)
July 2006 (13)
June 2006 (9)
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 (28)
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)
CLR blogs
David Notario (JIT Compiler)
Rick Byers (CLR)
Jonathan Keljo's blog
List of all CLR blogs
David Broman (Profiling)
Thomas Lai's blog
Other Blogs
Andy Pennell's Blog
GreggM's Blog
Steve's Blog
Tim's .NET blog for web developers
Other links
All about MDbg
What's new in v2.0?
Who am I?
ICorDebug/MDbg Forums
Contact me?
Browse by Tags
All Tags
»
Troubleshooting
(RSS)
Compilers & Languages
Design
Edit-And-Continue (EnC)
FuncEval
ICorDebug
Interop (mixed-mode)
MDbg
random .net
versioning
Whidbey (V2.0)
Thursday, November 01, 2007 1:34 PM
Why is System.Diagnostic.Debugger class compiled in retail?
There's a good reason that methods on a "System.Diagnostics.Debugger" class are still compiled in retail builds, although this occasionally surprises folks. Here's why... Background: The System.Diagnostics.Debugger class provides some useful low-level
Posted by
jmstall
|
0 Comments
Filed under:
Troubleshooting
,
random .net
Friday, October 12, 2007 1:54 AM
How to tell if a function is managed code?
This is a moot point for pure C# apps, but what if you're writing in MC++ (or some other 'mixed' language) and you want to know if a function is getting compiled as managed or native code? You can try and inspect the source and infer from the language
Posted by
jmstall
|
1 Comments
Filed under:
Interop (mixed-mode)
,
Troubleshooting
Tuesday, September 25, 2007 8:10 PM
Interop-debugging fails when using more than 63 TLS slots
Here's a Public Service Announcement: Interop-debugging may hang if the debuggee uses more than 63 native Thread Local-Storage slots and then loads the CLR. KB939969 has more details, including three workarounds. This is fixed in Orcas, so only applies
Posted by
jmstall
|
3 Comments
Filed under:
Interop (mixed-mode)
,
Troubleshooting
Monday, August 27, 2007 8:00 PM
ICorPublish does not cross the 32/64 bit boundary
I mentioned earlier that ICorDebug does not cross the 32/64 boundary . If you want to debug a 32-bit managed app, you need to use a 32-bit version of the ICorDebug interfaces (or Mdbg). If you want to debug a 64-bit managed app, you need a 64-bit savy
Posted by
jmstall
|
1 Comments
Filed under:
ICorDebug
,
Troubleshooting
Wednesday, January 10, 2007 1:27 AM
You don't want to write an interop debugger.
I've had a growing number of people inquire about how to write an interop-debugger with ICorDebug. My goal here is to discourage you from doing that. (This reminds me of one of my college classes. On day one, the acting-Prof launched into a great sermon
Posted by
jmstall
|
2 Comments
Filed under:
ICorDebug
,
Interop (mixed-mode)
,
Troubleshooting
Monday, October 23, 2006 11:56 AM
Possible slowdowns under a debugger
Here's a list of things that may slow down execution under a debugger. I've seen a few threads go by about ways that running under the debugger significantly slows down normal execution by more than 2x, and this is a collection of those items. Background
Posted by
jmstall
|
2 Comments
Filed under:
Troubleshooting
Thursday, September 28, 2006 3:06 AM
How to start a console app in a new window, the parent's window, or no window
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
Posted by
jmstall
|
4 Comments
Filed under:
Design
,
Troubleshooting
Monday, July 24, 2006 11:12 AM
Caveats about managed JIT-debugging
I received some questions in the mailbag about what Debugger.Launch actually does. Debugger.Launch the same mechanism as JIT-attach when you get an unhandled managed exception. Here are some random caveats about the jit-launch mechanism: Jit-launch calls
Posted by
jmstall
|
3 Comments
Filed under:
Troubleshooting
Friday, July 21, 2006 10:43 AM
Resolving functions and func-eval syntax
I got a question about MDbg's func-eval syntax, which brings up a nice point about function resolution: Is it possible to evaluate a function by specifying an instance variable instead of the fully qualified name of the class? f ex.get_StackTrace ...
Posted by
jmstall
|
0 Comments
Filed under:
Compilers & Languages
,
Troubleshooting
,
FuncEval
Wednesday, July 12, 2006 7:03 PM
#line hidden vs. DebuggerNonUserCode attribute
I got this great question from the mailbag: "[W]hat is the relation between the "# line hidden" directive and the DebuggerNonUserCode attribute ? Are these the same ?" Short Answer : They're both markings that library authors can put in their source code
Posted by
jmstall
|
1 Comments
Filed under:
Troubleshooting
Sunday, July 09, 2006 1:06 PM
Conventions for passing the arguments to a process
A process's main() function gets an array of strings for the command line args. This is string[] in C#, or {int argc, char** argv} in C/C++. But there are some different conventions for how the parent app passes those strings in. If you execute a program
Posted by
jmstall
|
4 Comments
Filed under:
Troubleshooting
Monday, July 03, 2006 2:16 PM
Managed vs. Native debugging APIs
FxCop has a great rule ( UseManagedEquivalentsOfWin32Api ) to tell you about managed APIs that exist instead of trying to pinvoke out. I'm writing a native debugger in managed code (more on this later), and FxCop was telling me to use the managed debugging
Posted by
jmstall
|
6 Comments
Filed under:
ICorDebug
,
Troubleshooting
Thursday, June 29, 2006 11:05 AM
Debugger won't properly evaluate C#s base keyword
Public Service Announcement: You may have noticed that trying to evaluate members using C#'s 'base' keyword in the debugger still calls the derived members. (The 'base' keyword lets you access base class member implementations from within a derived class,
Posted by
jmstall
|
8 Comments
Filed under:
Troubleshooting
,
FuncEval
Wednesday, June 28, 2006 10:54 AM
How to build Mdbg apps
I often publish little samples in this blog based off MDbg (which generally show off the debugging services in some way; such as app to convert Pdb-->XML , or this harness to print all exceptions in an app ). I generally call these apps "harnesses"
Posted by
jmstall
|
1 Comments
Filed under:
MDbg
,
Troubleshooting
Wednesday, May 24, 2006 3:23 PM
Beware of the Vectored Exception Handler and managed code
A vectored exception handler (see kernel32!AddVectoredExceptionHandler ) lets you add to a global list of filters that get executed by the OS when a native exception is thrown. More specifically, this list is executed by the OS before the filters in the
Posted by
jmstall
|
6 Comments
Filed under:
Interop (mixed-mode)
,
Troubleshooting
More Posts
Next page »