0
votes

I have a WPF Application (say, WPF.exe) with multiple tabs. In one of the tabs, I display a *.xbap using: WebBrowser tag.

<WebBrowser Source="c:/PublishedWebSites/Test.xbap"/>

When I start WPF.exe, I am able to attach debugger to any other UserControl but not to my XBAP. I also tried attaching my XBAP to PresentationHost.exe process which was started when I click on the browser tab.

The break points are not hit in XBAP project, though I verified that when I publish the XBAP, I oublish *.pdb files as well.

Could anyone tell me what I am doing wrong here?

Thanks, RDV.

1
why in the world are you doing that? - Federico Berasategui
I know what you mean :-). Let me explain my use case. I have an application which could be started as standalone as well can reside inside another application. Since we cannot have an exe within an exe, we created xbap which could be placed inside an exe. This model is working except the debug part which is good to have. Let me know if you can suggest a better solution - RDV

1 Answers

1
votes

I could debug. Steps: 1. Compile and Publish XBAP. DO NOT change anything after publishing.. in case you do.. republish it. 2. Ensure there are no PresentationHost.exe processes running. 3. Run the WPF application. Launch XBAP (as one of the tabs ..in my case). 4. Debug->Attach to process-> Connect to PresentationHost.exe=> ensure that you select the correct 32 vs 64 version (i think this was my mistake).

Thanks, RDV