Simple VS Addin (updated)

Back during the PDC for Whidbey I wrote a post about Creating a Simple Addin.  Recently I was looking to update it and found a horrible bug in it.  First, here is the corrected code:   public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom){    _applicationObject = (DTE2)application;    _addInInstance = (AddIn)addInInst;    _debuggerEvents = _applicationObject.Events.DebuggerEvents;   …

2

Naming threads in Win32 And .Net

When you are debugging an application with multiple threads it can be handy to have a better name than just the thread id.  This is simple to do in managed code.  There is a property on the Thread object that you can set.  It is also possible to do this for native code. However, there…

7

FuncEvil, the Clipboard, and Deadlocks

Mike Stall has a great post that, for a debugger dev, is the moral equivalent of sticking a fork in a toaster.  The basic problem he addresses is that once you are stopped in the debugger the UI for your application will no longer paint.  What if you need to see something on that UI?…

3

Change Debugger behavior with Attributes

Certain metadata attributes modify the stepping, breakpoint, and callstack behavior of the VS managed Debugger.  This is useful if you are creating an interpreter, language runtime, or a tool that modifies the code in a managed assembly.  There are three flavors of these attributes that affect execution control.  Each behaves slightly differently, and I always…

0

Netmodules: Sort of like a lib

I first ran into netmodules before VS 2002 was shipped. The netmodule gave me precisely what I asked for, without actually solving my problem.  I wanted to use multiple languages (C#, and C++ /clr) in a single assembly.  It turns out a single assembly can be multi-module.  Multi-module means a single .Net assembly is spread across…

1

XSLT debugging in Visual Studio

Visual Studio is a big tool.  It’s easy to miss some useful features.  Hopefully the XSLT debugger won’t get missed.   If you want to learn how to use XSLT debugging take a look at Neetu Rajpal’s msdn article Introducing Xml tools in VS 2005.  Below you can see the debugger in action as an xslt…

2

Edit and Continue on 64 bit Windows

Pascal writes about the joy of x64 Windows XP, and some drawbacks.  One drawback is no Edit and Continue using the 64 bit CLR.  You can, however, use E&C against the 32 bit CLR on a x64 machine.  Here’s how you do it:   You need to compile your managed assembly with a target CPU of…

11

Make DataTips Transparent

Enhanced datatips are my favorite new debugger feature. However, sometimes you want to see underneath the tip without losing your spot. Fortunately, JimGries thought of that. You can make the DataTip transparent by pressing the ctrl key or middle mouse button. Here is an Enhanced DataTip In Visual Studio 2005: Here is the same DataTip with the…

4

Post Mortems

I won the guess the murderer contest.   Shai and I compete to guess who the real murderer is on Law and Order Criminal Intent.  Last night we watched Sunday’s two hour show.  It’s a toss up who wins, but one of us always gets it by two thirds of the way through.  That’s the point…

0

Perf Awareness is not Premature

I’ve found myself adding a timer to each of the unit test frameworks I use so I can see how long my tests take.  I am not trying to do anything complex.  I just want to be aware of the perf.  The same way pass and fail are visible, 1ms vs 90ms is visible.   Premature optimization…

1