Question

When I start my Silverlight 4 and 5 applications with debugging in VS 2010, I can set breakpoints in both the client project as well as the server project that serves the application.

On running the app out-of-browser (ie configuring the app out-of-browser and setting it as the startup project) however, the debugger will not be attached to the server any longer, although the server project will still be started correctly.

Is there a way around this problem?

Was it helpful?

Solution

You can set a Launch or Break statement at the location you want to break.

// Will launch a debugger once and will break once
System.Diagnostics.Debugger.Launch();

//Will launch a debugger and break any time the code is hit
System.Diagnostics.Debugger.Break();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top