调试silverlight应用问题 [英] Debugging silverlight application problem

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

问题描述

我的 VS2010 不会在 Silverlight 应用程序内部的断点处停止.似乎在调试期间没有加载它的符号.当我将鼠标悬停在断点上时,它会显示当前不会命中刹车点,没有加载任何符号".

My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".

我已经尝试了 google 提供的所有可能的解决方案,但都没有成功.即使我创建由 ASP .NET Web 项目托管的全新 Silverlight 应用程序,也会出现问题.我的所有项目配置看起来都很好 - 在 Web 项目中启用了 Silverlight 调试.

I have tried all of possible solutions offered by google and have no success. The problem occurs even when I create brand new silverlight app hosted by an ASP .NET web project. All of my project configuration looks fine - silverlight debugging is enabled in the Web project.

我使用的是 Silverlight 4.这里有一个 从该项目创建的链接 .

I am using silverlight 4. here a link to the sample project created out from the tepmlate.

有什么想法吗?

P.S我刚刚尝试重新安装VS2010,问题仍然存在.

P.S I just tried to reinstall VS2010 and the problem still exists.

我刚刚在另一台机器上测试了同一个项目,它在断点处停止,看来问题出在 VS 或 Silverlight 的配置中.

I just tested the same project on another machine and it stops at the break point it seams that the problem is somewhere in the configuration of VS or silverlight.

在 Matt Dotson 的帮助下,我设法手动附加了调试器.但是这个解决方案对于日常使用来说还不够好.

with Matt Dotson's help I managed to attach the debugger manually. However this solution is not good enough for daily use.

推荐答案

根据我在 Silverlight 中的经验,遵循这些步骤可以让您的项目保持可调试性.

Depending on my experience in Silverlight following these steps keep your project debug-gable.

条件 1>

首先,我们需要确保在 Web 项目的属性中有一个 Web 部分,如下所示,必须选中 Silverlight 复选框.

Firstly we need to be ensure that in Web Project's properties there is a Web section, as you see below Silverlight checkbox must be checked.

条件 2>按照菜单调试 => 附加调试器>

Condition 2> Follow In Menu Debug => Attach Debugger>

Visual Studio 有时无法附加您需要带路的调试平台:).通过这种方式你可以调试其他平台,(你也可以调试你的产品平台,但pdb文件必须同步,不要忘记你可以使用它暂停你的产品平台).

Visual Studio sometimes can't attach debugging platform you need to lead the way :) . By this way you may debug other platforms,(also you may debug your product platform but pdb files must be sync and don't forget you may suspend your product platform using this).

条件 3> 您的默认 Web 浏览器可能是 Firefox、Chrome 或 IE 以外的其他浏览器.Visual Studio 默认尝试附加到 IE.但是当你运行 VS 调用默认浏览器时,所以你需要在条件 2 中有一个手动附件或通过右键单击默认页面 > 浏览方式设置默认浏览器.

Condition 3> Your default web browser may be Firefox,Chrome or other than IE.By Visual Studio default try to attach to IE. But when you run VS calls default browser,so you need to have a manual attachment in Condition 2 or set your default browser by right clicking on default page > Browse with .

条件4> 一般在web projectClientBin 目录下有xap 文件.有时在构建操作后,此文件无法替换,并且您的 ProjectDll 和您的 Project PDB 文件不同步.这会导致调试时行匹配错误或找不到调试文件附加警告.我强烈建议删除 Bus 项目中所有生成的文件并删除 ClientbinProjectName.xap 文件.重建后一切正常!

Condition 4> There is xap file generally located in web projectClientBin directory. Sometimes after build operations this file can't be replaced and your ProjectDll and your Project PDB files not be sync. This cause wrong line match while debugging or can't find a debugging file attached caution. I strongly suggest delete all generated files in Bus project and delete ClientbinProjectName.xap file. After rebuild all it must be ok!

希望有所帮助.

这篇关于调试silverlight应用问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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