调试WPF应用程序中托管的XBAP [英] Debug XBAP hosted in WPF Application

查看:109
本文介绍了调试WPF应用程序中托管的XBAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有多个选项卡的WPF应用程序(例如WPF.exe)。在其中一个标签中,我使用WebBrowser标记显示* .xbap。

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"/>

启动WPF.exe时,我可以将调试器附加到任何其他UserControl上,但不能附加到我的XBAP。我还尝试将XBAP附加到PresentationHost.exe进程,该进程是在单击浏览器选项卡时启动的。

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.

在XBAP项目中没有遇到断点,尽管我已验证在发布XBAP时也使用* .pdb文件。

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?

谢谢,
RDV。

Thanks, RDV.

推荐答案

我可以调试。步骤:
1.编译并发布XBAP。发布后请勿更改任何内容,以防万一。重新发布。
2.确保没有PresentationHost.exe进程正在运行。
3.运行WPF应用程序。启动XBAP(在我的情况下,作为选项卡之一。)。
4.调试->附加到进程->连接到PresentationHost.exe =>确保您选择正确的32 vs 64版本(我认为这是我的错误)。

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

谢谢,
RDV

Thanks, RDV

这篇关于调试WPF应用程序中托管的XBAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆