Friday, February 6, 2009

Debugging Problems. What to do when you can't hit your breakpoints in a Silverlight app.

Man! I have wasted a lot of time the past two days with this one, so I thought I would blog about it immediately in case anyone else is seeing this. As I was working on a Silverlight app, I ran into a bug. I decided to add a breakpoint and run the debugger in order to see what was going on. I added the breakpoint and ran the debugger (F5). I noticed the red circle that indicates the breakpoint changed from a red circle to a little warning sign with an error message. "The breakpoint will not currently be hit. No symbols have been loaded for this document."


This started me off on an incredibly painful, and long search for answers. I tried deleting every possible temporary file I could think of. I tried cleaning the solution and rebuilding it. I restarted Visual Studio. I ran IISReset. I rebooted my machine. I tried a handful of other things and... nothing! I was still not able to debug! Finally, one of my co-workers saw a post on that said to check the properties of the web project you are trying to debug (right click on it in the solution explorer). Next click on the Web tab and make sure that Silverlight is selected as one of the Debugger options.


Some way or another, the Silverlight option became unchecked. Once I checked it, I was able to run and debug with no problems. I hope this saves some of you a lot of headaches and hours of wasted time.

Good find on this one Scott!

--To view more of my posts on WPF and Silverlight please visit

1 comment:

  1. I've hit this same problem, even with the "Silverlight" checkbox checked. In such cases, I've had to uncheck it, save the project, then check it again.

    A shame this wasn't fixed in the RC.

    This MS Connect issue may be describing the issue.