VS 2010 调试器在附加到 NUnit 时不加载符号 [英] VS 2010 debugger not loading symbols when attaching to NUnit

查看:53
本文介绍了VS 2010 调试器在附加到 NUnit 时不加载符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(我刚刚在 groups.google.com 上的 NUnit 讨论组中发布了此内容)

(I just posted this in the NUnit discussion group on groups.google.com)

在 VS 2008 下,我会在 NUnit 下运行我的测试,如果我需要调试,我会将 VS2008 调试器附加到正在运行的 Nunit 进程(调试 -> 附加到进程),并在我想要的代码上设置任何断点检查.当我在 NUnit 中点击 Run 按钮时,它会点击断点.(顺便说一句,如果重要的话,这是运行 NUnit 2.5.2).

Under VS 2008, I would run my tests under NUnit, and, if I needed to debug, I would attach the VS2008 debugger to the running Nunit process (Debug -> Attach to Process), and set any breakpoints on code I wanted to examine. When I hit the Run buttion in NUnit, it would hit the breakpoint. (BTW, if it matters, this was running NUnit 2.5.2).

我刚刚升级到 NUnit 2.5.4 和 VS 2010.当我设置断点时,然后附加到 NUnit,我在断点上得到一个小警告符号点,将鼠标悬停在它上面会给出工具提示断点不会被打.当前未加载任何符号".转到调试 -> Windows -> 模块窗口显示一大堆 Windows 和 NUnit 模块已加载,符号状态为跳过加载符号",然后1 个具有每次更改的有趣名称的模块(r1euhmh5 对现在),以及未加载符号"的符号状态.(没有像我在测试中的 DLL 远程名称的模块的踪迹).

I just upgraded to NUnit 2.5.4 and VS 2010. When I set a breakpoint, then attach to NUnit, I get a little warning symbol on the breakpoint dot, and hovering over it gives the tooltip "Breakpoint will not be hit. No symbols are currently loaded". Going to the Debug -> Windows -> Modules window shows a whole bunch of Windows and NUnit modules loaded, with the Symbol Status of "Skipped loading symbols", and then 1 module with a funny name that changes each time (r1euhmh5 right now), and Symbol Status of "No symbols loaded". (There is no trace of a module with a name remotely like my DLL under test).

右键单击有趣的文件名(假设这是我的一些映射DLL 下测试),然后单击 Load Symbols From -> Symbol Path,然后导航到 bin\debug 文件夹,然后单击我的 pdb 文件正在测试 DLL,我收到消息在这个文件夹".(打开对话框的顶部有一行说"原位置:r1euhmh5.pdb")

Right clicking the funny filename (assuming that to be some mapping from my DLL under test), and clicking Load Symbols From -> Symbol Path, and navigating to the bin\debug folder, then clicking the pdb file of my DLL under test, I get the message "A matching symbol was not found in this folder". (The top of the Open dialog box has a line that says "Original location: r1euhmh5.pdb")

那么有什么变化?我如何进行调试/断点在 VS 2010/NUnit 2.5.4 下(或者有可能我搞砸了当我决定通过我的 VS2010 选项并将其中一些设置为比我知道自己在做什么更高级的水平?)

So what's changed? And how do I go about debugging/breakpointing under VS 2010/NUnit 2.5.4 (Or is it possible I screwed something up when I decided to go through my VS2010 options and set some of them to more advanced levels than I knew what I was doing?)

感谢您的帮助.

推荐答案

我不确定我完全理解为什么,但答案是将调试器附加到 nunit-agent.exe 而不是 nunit.exe.查看查理普尔的回复此处

I'm not sure I understand exactly why, but the answer is to attach the debugger to nunit-agent.exe instead of nunit.exe. See Charlie Poole's response here

这篇关于VS 2010 调试器在附加到 NUnit 时不加载符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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