Unexpected Behavior

Visual Studio’s immediate window, our old friend, is generally a very powerful debugging aid. A few judicious commands executed there can save hours of manually reading through source code that makes sense on paper on screen.

In fact the only place the immediate window fails to deliver is when dumping the contents of multi-line string variables. In this particular instance, it is a close race  between the immediate window and a chocolate teapot as to who is of less use.

Look at this sample code:

P.S. Yes, that is inline SQL! Sue me!

If you put a breakpoint at the Console.ReadLine() and dump the contents to the immediate window, this monstrosity rears its ugly head:

 

This, needless to say, is not something I generally want. This SQL statement cannot be pasted and executed in Query Analyzer / iSQL / SQL*Plus without forcing me to open another application and wrestling with search and replace and then pasting *that* to the query window.

Why not dump the string as it is?

Aside:

Watching a newbie try to use Windows Media player this weekend made me realize just how hostile it is to completely green users. The more I thought about it the more I realized is that it actually is not as easy to use as it seems!

For  example:

Does this mean the movie is paused and will play if you click the button or it is playing and will pause when you click the button?

I found myself unable to answer what the heck this button does

And what the hell is the second set of maximize, minimize and close buttons for?

Builder

Here is the last update to builder EVER by me. It was a proof of concept and I enjoyed wrestling with the code but  there will be a proper tool from Microsoft eventually. No need for me to lose sleep over it!

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • co.mments
  • del.icio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • TailRank
  • YahooMyWeb
 

Leave a Reply