Debugging XBAP applications on Vista using Visual Studio 2005

January 23, 2007 5:35 pm

I ran into an interesting little quirk with Visual Studio 2005 on Vista yesterday. I was trying to start an XBAP debugging session from VS (using the F5 key), and none of my breakpoints got triggered. Upon exiting the IE instance that hosts PresentationHost.exe, VS considered the session as still “running”.

I had set my system up according to Tim Sneath’s post on the perfect WPF developer system, including VS 2005 SP1 and the beta version of the Vista extensions for VS 2005. I was running VS “as administrator”.

As it turns out there are some technical details around starting XBAP debugging sessions from an elevated VS process that cause this behavior if you already have another instance of IE running when starting the debugging session.

Thanks to Tim Sneath and Chango Valtchev at Microsoft for helping in tracking this down!

Moral of the story: If you want to debug an XBAP from VS 2005 under Vista, run VS non-elevated, or make sure you have no other instances of IE running when you start the debugging session.

4 Responses to “Debugging XBAP applications on Vista using Visual Studio 2005”

Rebecca Cooper wrote a comment on October 12, 2007

I am having problems getting debug breakpoints to work in Visual Studio 2005 ever since I moved to Vista. Is it something with the new framework? Have you found anything else about this?


GeekTieGuy wrote a comment on October 12, 2007

Hey Rebecca,

No, I have not run into general breakpoint problems on Vista, however, you need to make sure you have Service Pack 1 for Visual Studio 2005 installed as well as the Visual Studio 2005 update for Windows Vista (in that order).

If you’re doing WPF / .NET Framework 3.0 stuff, you need the November 2006 CTP of the WPF extensions for Visual Studio as well. You can find links to all of these in the article by Tim Sneath that I linked to in the post.

PIF wrote a comment on September 22, 2009

I have The exact same problems, installed everything I could(the links in the article are outdated),your “solution” does not work(at all).You are definitely missing something …

GeekTieGuy wrote a comment on September 22, 2009

Umm, did you look at the date when I posted this (hint: it was over 2 years ago)? Obviously things have changed since the days of Visual Studio 2005. I’m not pretending like I have all the answers. I just post things that might be useful at the time when I’m posting them. I may very well be missing something. That’s the beauty of blogs. People can build on other people’s findings and improve upon them. So maybe that would be something you could do?

Care to comment?

%d bloggers like this: