Friday, January 27, 2006

Have these always been here? Or am I being stupid?

In the code editor in VS 2005 (any edition I guess, but I've been using VS Team Edition for Software Developers):

  1. Right Click.
  2. Expand the 'Breakpoint' menu item.
  3. Click 'Insert Tracepoint'
  4. Enter a message

You'll now have whatever message you want printed out in the output window. It can print the calling method, stack trace and a whole raft of other stuff.

Although I'm quite inclined to use Trace.Write() in a web app (I figure if it's something you want to know when you're writing it initially, it'll be useful to know when it's actually in use), there are times when it's a bit of overkill putting a permanent trace in for some of the stuff you're debugging.

Neat eh? I've just discovered that it's there is Visual Studio but not the Express Editions.

Just wanted to share.

No comments: