为什么VS2010调试器在我的断点停止? [英] Why doesn't VS2010 debugger stop at my breakpoints?

查看:116
本文介绍了为什么VS2010调试器在我的断点停止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在VS2010中的C#.NET类库项目中工作。在我的项目设置 - >调试设置中,我将项目设置为启动一个运行一个非常简单的jscript文件(test.js)的外部程序(C:\Windows\SysWOW64\wscript.exe)。脚本只是创建一个类的实例,并调用其中的一个方法。

I am working on a C#.NET class library project in VS2010. In my project settings -> debug settings, I have the project set to start an external program (C:\Windows\SysWOW64\wscript.exe) which runs a very simple jscript file (test.js). The script simply creates an instance of the class and calls one of it's methods.

问题是当我开始调试时,VS2010不会停止任何我的断点。如果我在VS2008中打开完全相同的项目,它会在断点处停下来。有没有新的设置阻止断点被击中?有没有人遇到这个问题?

The problem is when I start debugging, VS2010 does not stop at any of my breakpoints. If I open up the exact same project in VS2008 it does stop at the break points. Is there a new setting somewhere that is preventing the breakpoints from being hit? Has anyone else ran into this issue?

推荐答案

要解决这个问题,通过为使用组件的应用程序创建一个配置文件使用以下数据进行调试:

To solved this problem by creating a config file for the application which is using the component to debug with the following data:

<?xml version="1.0"?>
<configuration>
  <startup>
     <supportedRuntime version="v2.0.50727"/>
  </startup>
</configuration>

使用此文件,您可以告诉调试器使用正确的运行时版本进行调试(似乎调试器使用默认版本4.0)。

With this file you tell the debugger to use the right runtime version for debugging (it seems the debugger uses version 4.0 by default).

这篇关于为什么VS2010调试器在我的断点停止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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