简体   繁体   中英

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.

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM