Cheng Chen
Cheng Chen

Reputation: 43513

How to debug silverlight applications?

I want to trace the code when the data is loaded. (VS2010 Silverlight4)

<riaControls:DomainDataSource Name="domainDS" HorizontalAlignment="Left" VerticalAlignment="Top" QueryName="GetPlanQuery" LoadedData="domainDS_LoadedData">
...
</riaControls:DomainDataSource>

In the code behind:

private void domainDS_LoadedData(object sender, LoadedDataEventArgs e)
{
   //break points here will never be hit
}

Is there any way to debug the code even the project is compiled to an XAP file and added to some page in another web project? I have all the project source code. Thanks.

Upvotes: 2

Views: 387

Answers (1)

Neil F
Neil F

Reputation: 402

You should be able to debug the code, through the Debug -> Attach to process menu item, then search for iexplore.exe in the Available Process list.

I've been caught out a couple of times with it not debugging because Silverlight wasn't selected in the Attach To list (located above the available process list in the Attach to process dialog).

Upvotes: 1

Related Questions