Debugger Goodies in VS 2005 Beta 1


Visual Studio 2005 Beta 1 is announced at last! Previously known as Whidbey (and internally it will forever known as Whidbey, as 7.1 is forever Everett, as 7.0 is, er, 7.0) this beta is going to be available to MSDN Universal subscribers, and some other ways too (see later). Here’s what I am excited about in the debugger:

New DataTips. Remember back to Visual C++ 4.0 (I think) that first brought you DataTips? Well think of those same tips, but on crack, and you get New Datatips. You can inspect whole objects in the datatips now, kind of a floating Watch window. It is the most important improvement to the debugger since, well, since VC2 really.

Tracepoints. A tracepoint is a breakpoint that doesn’t stop. Huh you say? Well instead of stopping, they print messages. Anything you like, including text, variables, stack traces, anything you like really. They are a great way to add logging to code without having to rebuild a thing. You can read more about Tracepoints in John’s blog: he wrote the code (a long time ago when he was on our team) and he’s so happy they finally made it into a product.

Source file checksums. Ever got the debugger confused by having two different source files with the same name but in different paths? We have, and lots of other people too (especially default.aspx). The confusion is over: the C++, C# and VB compilers now emit a checksum of the source file into the debug info, so the debugger can tell if it got the right version or not. This makes breakpoints bind to the right source file even in the case of multiple matching basenames, something that has troubled us (and users) forever. (Note that checksums are not generated for ASP.NET compiles in beta 1).

Visualizers. Using a complex managed type that is ugly to view in the Watch window (e.g. DataSet)? Now you can either use a built-in Visualizer, or write your own. For DataSet you see the data in a proper grid control, for example. You can view long strings in a text editor, or an XML viewer if you like. If you want to write your own Visualizer for your type, or a Frameworks type, go right ahead. It just takes a bit of C#.

STL Data Display. STL types have always been a challenge for the debugger. In VC6 the debug format truncated the managled names at 255 bytes so you often couldn’t even manually look at the structure of some STL objects. We fixed that in 7.0, but ugly data structures are still ugly even if you can see more of them. VS Whidbey has a meta-language that lets you define exactly how to display complex types and includes support for all the common STL types. A hash table displays as an array in the debugger now, instead of that ugly thing it really is.

64-bit Support. Both native and managed debuggers support AMD64 and IA64 debugging now, with good feature parity with 32-bit, though no Edit & Continue or Mixed debugging.

Intellisense in the Debugger Windows. The debugger windows (like Watch and Locals) now support Intellisense, for C# and VB users. You’re gonna love that.

Edit and Continue. At last VB users can edit their code while debugging, and the change will occur right then, without having to restart the debugger. C# users please see my old blog about why you can’t do this (yet).

After beta 1 we don’t have much in the way of new debugger features, sorry, we have to mostly crank up the robustness and performance so we can ship this for real. We’ve got one new feature coming though that you will love. Can’t tell you what though, sorry. Gotta get back to implementing it…

You can find more info about VS 2005 beta 1 here soon I hope, plus there are the new Express versions for immediate download here. The Express SKUs have a simplified debugger, so you wont get every new feature listed here, but you are welcome to download whichever one grabs you and take the new debugger for a spin. Let me know what you think.

Comments (23)

  1. Joku says:

    Just installing the C# Express, after uninstalling May CTP. Installation progressbar indicates "100%", but the Cancel button has stayed on for minutes now with no cpu/disk activity.

    While waiting for something to happen, I’d comment on the code names. They can also be more nice when searching stuff, as with Visual Studio 2005, it is hard to know what you should enter to google when searchin related info. VS2k5, VS2005, VS 2005, Visual Studio 2005.. And when 2005 comes, if you do not quote like "Visual Studio 2005", you could end up finding totally non-relevant information. Oh and if this was some popular product, you could expect a ton of the first hits be in shops product catalog pages. My current tactic is to add this to the google query: -site:.com -site:.co.uk -site:.com.whatever Unfortunately not all shops are .com.

    Oh well, guess I’m just ranting cause trying to find "product review" brings a ton of shops with no reviews. If MSN had "-shops" to indicate I do not want product catalogs etc, I’d consider using MSN sometime.

  2. Joku says:

    Ok well last flood of posts. It seems the VS itself was installed, atleast it starts ok. Not so sure about SQL server. The wcumsdnexpressmsdnixp.exe was not found in the mentioned path. It could be my own fault now that I think of it! I was looking where the setup.exe downloads the stuff, and made a backup copy of the stuff so I don’t need to download it many times – it could be I accidently moved instead of copied the files – not sure. So perhaps my own stupidity 🙂

  3. Andy Pennell says:

    I checked and clicking Cancel during the Download phase of Express setup will crash it, a known issue. I deleted earlier posts from Joku that contained more detail of his Setup attempts, hope that is ok.

  4. Kevin Dente says:

    This is the first I’d heard of tracepoints. Sounds fantastic.

  5. Boris Letocha says:

    STL Data Display – Just tested Visual C++ Express Beta 1 – and this definitely does not work atleast for std::vector<std::string> – which is most basic I would expect to work.

    So is it only nonexpress feature?

  6. Andy Pennell says:

    Works for me: I created a New Project / Win32 / Console, pasted in this code to main:

    std::vector<std::string> V;

    V.insert(V.begin(), "hello");

    V.insert(V.begin(), "there");

    When I look at V in the debugger, single line shows 2 and clicking + shows 2 children, as if it were an array.

  7. Joku says:

    Yeah, no problem to delete flood like this one 🙂 I manually installed the missing stuff and now the help doesn’t find the docs, so I guess I’ll just reinstall whole thing. Now that I found the readme, the hanging install is known issue 2.11 in the readme, too bad I missed this one earlier. There could be a word about the hanging+10min wait more upfront stated, unless it’s going to be fixed though. You may delete this and previous message as these are offtopic.

  8. Andy Pennell says:

    Duh, I forgot to add Yukon (SQL Server 2005) debugging to the list. You can write C# code, deploy it to the SQL Server, then debug it. Or VB. Its awesome!

  9. Boris Letocha says:

    I test STL Data Display again in Visual C++ Express Beta 1 and it really didn’t worked for me. I have screen shot which I can send to you, but I didn’t found your e-mail.

    I will download full VS Beta 1 as soon as possible and I will test it there …

  10. Andy Pennell says:

    Boris, make sure your code is not managed C++: the STL display code only works for native C++, not managed C++. You can submit the screenshot if you use the new bug reporting tool (LadyBug), or if you click Contact on the blog menu I’ll reply and you can email me it directly then.

  11. Boris Letocha says:

    Aha, It was in managed C++. From your description I didn’t understand that it should work only in native.

  12. Andy Pennell says:

    Sorry about that Boris. Managed C++ is kind of in the worst place, debugger-wise. Native users want all of the features they have when debugging native code, and Managed users want all their features too. Sadly for various reasons we meet neither customer’s goals frankly right now. In Whidbey at least you can view many native types when you are in managed code, which Everett could not.

  13. Boris Letocha says:

    No problem for me – I didn’t expect it would work (only because you write it). Still in my opinion for .Net programming C# should be used because of cleaner design, which C++ cannot never get because of C compatibility. And soon as C# compiler will be optimizing as VC++ and computers get faster who would be bothered with C++ anymore. So even these enhancements as C++/CLI are wasted time IMO. And I did’t saying it because I hate C++, actually I love it (last 8 years programing 90% of time in C++), but is so complex that NOBODY – even MS cannot create reliable tools for intellisence, refactoring, debuging, fast compilation, … and on other platforms C++ is even bigger misery.

  14. Andy Pennell says:

    I updated the Tracepoints section to include a link to more info, from their creator at http://blogs.msdn.com/ms_joc/archive/2004/07/02/171960.aspx

  15. Ziv Caspi says:

    Andy, does it support step-over a function call with interruptions only if an exception is thrown out of the function you step-over? This is the #1 feature I want when I debug code that throws exceptions. (This would be much more usable than break-if-not-handled.)

    Thanks

  16. Keith Hil says:

    This is a cool feature. I wrote one for a brown bag presentation on what’s new in VS 2005 B1. It took me a while though to find that even though some of the types are defined in the System.Diagnostics namespace they are actually packaged in Microsoft.VisualStudio.DebuggerVisualizers.dll.

  17. No hacen m&#225;s que aparecer art&#237;culos y blogs con las nuevas funcionalidades. Y ya son tantos que me es…

  18. From a previous comment:

    &amp;gt; A copy of the source tree that exactly matches that test VS. Why IDE…

  19. From a previous comment: &gt; A copy of the source tree that exactly matches that test VS. Why IDE unable