将 MonoDevelop 调试器附加到 OS X 上运行的 NUnit 测试
确实按照标题提问。
我正在寻找一种在 OS X 上使用 MonoDevelop 逐步运行单元测试的方法,就像使用 Visual Studio 一样(通过将调试器手动附加到 nunit 进程)。
如果这在 MonoDevelop(在 OS X 上)上是可能的,那么如何实现并不明显。将不胜感激任何指点。
Question as per the title really.
I'm looking for a way to step through running unit tests using MonoDevelop on OS X in the same way you can with Visual Studio (by attaching the debugger manually to the nunit process).
If this is possible on MonoDevelop (on OS X) then it's not obvious how. Would appreciate any pointers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正常构建代码,然后将 exe、dll 和 mdb 文件复制到另一台计算机。
在调试器主机上设置以下环境变量并运行 monodevelop:(
您可能需要编辑启动 monodevelop 的实际脚本并添加第一行)
启动 monodevelop,加载解决方案,设置断点,然后单击 运行> 调试方式 > 自定义 Mono 软调试器。
出现对话框后,将 127.0.0.1 替换为调试器的 IP。然后单击“Listen”
然后,在另一台主机上运行:
将
IP
和PORT
替换为调试器上给定的值。Build your code as normal, then copy the exes, dlls and mdb files to your other computer.
On your debugger host set the following environment variable and run monodevelop:
(you might need to edit the actual script that monodevelop is launched with and add the first line)
Fire up monodevelop, load your solution, set a break point and then click Run > Debug With > Custom Mono Soft Debugger.
Once the dialog appears, replace 127.0.0.1 with the IP of your debugger. Then click "Listen"
Then, on the other host run :
Replace
IP
andPORT
with the values given on the debugger.那么您想要运行 NUnit 然后附加到正在运行的进程吗?
我认为调试 NUnit 测试的唯一方法是在 MonoDevelop NUnit 项目中进行。从那里你可以点击“调试”菜单项,它将为你启动 NUnit 并处理你的断点等。
请注意,你将很难让它与 MonoTouch 一起工作,请参阅 此处。
So you are wanting to run NUnit and then attach to the running process?
I think the only way to debug NUnit tests are from within a MonoDevelop NUnit project. From there you can hit the Debug menu item, and it will start NUnit for you and handle your breakpoints, etc.
Note that you will have difficulty getting it to work with MonoTouch, see here.