How do I debug a published XBAP file in VS2010?

I need to debug a full-trust application either by specifying a URL or, ideally, from within the web app I am intending to deploy it to. I've tried the following:

  • Running "PresentationHost.exe -embedding" from the command-line, attaching through Visual Studio. The IDE shows that my breakpoints are valid until I actually attempt to load the .xbap file, at which point it shows that there are no symbols loaded. None of my breakpoints are hit. I've tried "mage -cc" before doing this per several recommendations elsewhere

Found it. The "PresentationHost.exe -embedding" will work, provided that you select the .pdb file to be published, which it is not by default. This follows from what I saw before, where the debugger appeared to have symbols then not, once the app actually loaded. To clarify:

    • Go into the Publish tab on the project properties
    • Click "Application Files..."
    • Check "Show all files"
    • Select the .pdb file for the executable to be included.
    • Republish
    • PresentationHost.exe -embedding
    • Attach to process or set the project to run this out of the debug tab
    • Launch the web page in a browser and navigate to the xbap file, breakpoints should be hit now.

If you have access to source code and you deploy on localhost you can simply add System.Diagnostics.Debugger.Launch(); in your code. This will allow You to attach with VS to any process your XBAP is using.

 

from:http://stackoverflow.com/questions/3688623/how-do-i-debug-a-published-xbap-file-in-vs2010

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值