Welcome to MSDN Blogs Sign in | Join | Help

November 2005 - Posts

VS 2003 can not debug .NET 2.0 apps.

Somebody asked here on the forums if you can use VS 2003 to debug .NET 2.0 (whidbey) apps. Unfortunately, the answer is no. VS 2003 can not debug .NET 2.0 apps. It is a restriction in the underlying .NET debugging services (see below) You can still use

Tool to get snapshot of managed callstacks

I wrote a simple tool to take a snapshot of a running managed process and dump the output as an XML file. I'll post the full source as a sample on MSDN. [ Update 6/26/06] After great delay, source posted here . Also, check out Managed Stack Explorer ,
Posted by jmstall | 14 Comments
Filed under: ,

Blog Category for Func-eval

I created a blog category for Func-eval (aka Property Evaluation), and I updated some of my old posts to be in this category. And while I'm at it, some other func-eval blog entries: GreggM on Func-eval and Winforms SteveJS on Nested Break States (stopping
Posted by jmstall | 6 Comments
Filed under: ,

Poor Man's Radio

I stumbled across this by accident. If you want a radio in your office, just call a service department and switch to speakerphone when they put you on hold. I don't have a radio in my office, and my computer doesn't have speakers. But my office has been
Posted by jmstall | 6 Comments
Filed under:

Use streams to simplify Stitching problems

Sometimes you need to take several different streams of information and "stitch" them together into a single stream. This sounds simple, but can be very meticulous because you need to deal with things like: * off-by-1 bugs and lots of corner cases * generally
Posted by jmstall | 1 Comments

Writing a debugger in VB

Some might consider writing a managed debugger in VB.Net to be an oxymoron . But maybe not. Here's a VB.Net snippet that serves as a highly-specialized debugger to launch an app and print all the modules that get loaded. This is adapted from the C# sample
Posted by jmstall | 1 Comments

What I'm reading now...

I'm currently reading: " Why Programs Fail ", by Andreas Zeller . The basic premise is that there's a science to Debugging, and you can build automated tools that actually help with the anaylsis in debugging - and he's not just talking about smarter breakpoints.
Posted by jmstall | 1 Comments
Filed under:

Only 1 checkin in 4 months?

I haven't actually checked in a code change to the CLR in months now. Yesterday I made my first change to the new product (CLR V3). Before that, I've only made one change since 7/15/05. That's 1 product change (it was on 8/26/05) in a 4 month window (between
Posted by jmstall | 4 Comments
Filed under:

Updated MDbg GUI

I've updated the MDbg GUI . We'll be integrating this into the actual MDbg sample and it will all be available in the MDbg download. Here's a list of what's improved. I'll certainly post when the download site gets updated. IL support 1) Added integrated
Posted by jmstall | 3 Comments
Filed under:

Rules of Funceval

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
Posted by jmstall | 5 Comments
Filed under: ,

Presentation on AOP + Debuggability

Today I gave a presentation on AOP + debuggability on .NET as part of Microsoft's AOP workshop ( http://research.microsoft.com/workshops/aop/ ). The presentation is available online here (it's power point). The deck has some bonus slides that I didn't
Posted by jmstall | 1 Comments

Why you sometimes get a bogus ContextSwitchDeadLock MDA under the debugger

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 STA
Posted by jmstall | 0 Comments
Filed under:

Managed Debug Assistants (MDAs) are cool.

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
Posted by jmstall | 10 Comments
Filed under:

AOP and Debuggability

I'll be giving a short presentation at an upcoming Microsoft workshop on Aspect Oriented Programming on .NET. More information about the workshop is here: http://research.microsoft.com/workshops/aop/ I don't know much about AOP, but I do know a thing
Posted by jmstall | 0 Comments

MDbg Linkfest

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
Posted by jmstall | 11 Comments
Filed under: ,

Summary of the role of MDbg and Cordbg

I want to summarize in one place our views on Mdbg and Cordbg, and our plans for their future. Our views on the different debuggers : Cordbg/Mdbg - In general, we've never viewed Cordbg or MDbg as ideal production quality debuggers. We view Cordbg/Mdbg
Posted by jmstall | 6 Comments
Filed under:

New toys

My home computer was a 5 year old x86 single-proc 600 mhz. Stop laughing! It ran Windows XP, Visual Studio 2003, MS terminal-server client, Age of Empires II, and Civilization 3. It could not run Rise of Nations or most any 1st person shooter. Two weeks
Posted by jmstall | 8 Comments
Filed under:

Our policy on policy

... is that we don't want the platform making policy decisions. In general, any time the platform makes an arbitrary policy decision, half of our clients will think it's the wrong one. This why we're trying to shift our architecture focus to enabling
Posted by jmstall | 0 Comments
Filed under:

Using Funceval to Inject code into another app

It's possible for a managed debugger to attach to an app and inject arbitrary stub code into the app, without any prior cooperation from the app. The more technical description is that while the debuggee is stopped, the debugger can load an arbitrary
Posted by jmstall | 5 Comments
Filed under:

BCL's Stacktrace doesn't capture locals.

I blogged here about how you can use the System.Diagnostics.StackTrace class to get a stack trace of your current thread. However, you can't use this to get current locals. Ideally, we'd have a method like: Pair<string, object>[] StackFrame.GetLocals()
Posted by jmstall | 0 Comments
Filed under:

You can't debug yourself

You can't debug your own process. Both managed and native debugging are process-wide, and so the debugger would end up freezing itself. The problem is that a debuggee generates some debug event (perhaps hitting a breakpoint), and then stops until the
Posted by jmstall | 4 Comments
Filed under:

MDbg extension to debug IL

I've updated the MDbg gui to provide IL debugging. I blogged here that the CLR actually lets you debug at the IL level (with some restrictions), but no debugger actually exposes this feature. People were skeptical, and now that we shipped whidbey, I've
Posted by jmstall | 14 Comments
Filed under:

Small changes can prevent optimizations.

Here's an example where adding a very useful (and seemingly innocent) method could prevent some useful optimizations. The ILGenerator class provides a reasonably safe way to emit a stream of IL. It has a bunch of overloaded Emit methods that emit various
Posted by jmstall | 2 Comments
 
Page view tracker