Debug SL3 OOB application startup

May 27, 2009

Just a short post.
The other day I was having some trouble debugging the start up of a Silverlight 3 OOB application. The problem was well and truly gone before I could attach to the application from Visual Studio.

If you didn’t realise, you can attach VS to your OOB app by attaching to the appropriate sllauncher.exe instance.

As stated though, you will miss out on any start up problems you are trying to debug.

My (hacky) work around was to wack this in my start up code… I wacked it in MainPage.xaml.cs, but I can’t see any reason this won’t work in App.xaml.cs:

while (!Debugger.IsAttached)
{
    Thread.Sleep(100);
}

This code will basically hang the app until you attach your debugger! Just make sure you don’t let this one in to production :)


June 2 SDDN Meeting in Sydney

May 27, 2009

Miguel has been very organised and has another SDDN meeting off the ground in Sydney!

From Miguel’s blog:

“Next Tuesday, June 2 at 6:30 at Microsoft in Sydney (1 Epping Road, North Ryde NSW) we will have the SSDN Sydney’s June Meeting. This time Tatham Oddie will be talking about the new Out of Browser features in Silverlight 3 and Sergey Klementiev will presenting “LOB applications in Silverlight Lap around middle tier”. You will also have the opportunity to win a copy full of Expression 2 Suite and the best of all network amongst your Silverlight peers. So don’t miss it.”

Register on the site.

See you there!