Debug XBAP hosted in WPF Application

我们两清 提交于 2019-12-23 04:45:14

问题


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:


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



来源:https://stackoverflow.com/questions/24195443/debug-xbap-hosted-in-wpf-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!