简体   繁体   English

如何调试推送到我的TFS构建服务器的代码?

[英]How do I debug code pushed to my TFS build server?

I have a project that runs, builds, and passes all unit tests locally, but whose unit tests fail on the build server. 我有一个项目在本地运行,构建和传递所有单元测试,但其构建服务器上的单元测试失败。 I am using .NET 4.5, TFS, and VS 2012. Ideally I would like to step through the code that is executing on the server so I can gate on failing unit tests again. 我正在使用.NET 4.5,TFS和VS 2012.理想情况下,我想逐步执行在服务器上执行的代码,以便我可以再次关闭失败的单元测试。

Here's one way, 这是一种方式,

Debug directly on the build server 直接在构建服务器上进行调试

  1. Connect to the build server manually through RDP 通过RDP手动连接到构建服务器
  2. Navigate to where the build downloaded the source to 导航到构建下载源的位置
  3. Open up the solution file(s) in Visual Studio, and in Test Explorer, right-click > Debug Selected Tests 在Visual Studio中打开解决方案文件,在“测试资源管理器”中,右键单击“>调试所选测试”

And another way if setting up networking for the VS Remote Debugger isn't a huge pain, 另一种方法是,为VS远程调试器设置网络并不是一个巨大的痛苦,

Remote debug the tests on the build server 远程调试构建服务器上的测试

  1. Connect to the build server manually through RDP 通过RDP手动连接到构建服务器
  2. Start the Visual Studio Remote Debugging Monitor (needs to be downloaded/installed) 启动Visual Studio远程调试监视器(需要下载/安装)
  3. On your own machine, open up the solution and set up the test project to run using the test runner (eg mstest) on the remote machine (see here for screenshots) 在您自己的机器上,打开解决方案并设置测试项目以使用远程计算机上的测试运行器(例如mstest)运行(请参见此处获取屏幕截图)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在针对已编码的ui的调试中运行代码时,如何获取文件的相对路径 - How do i get a relative path of a file when running my code in debug for coded ui 如何为要在TFS中检入代码的文件提供路径? - How do I give file path for code to be checked in at TFS? 在构建服务器上进行单元测试:发布还是调试代码? - Unit testing on a build server : Release or Debug code? 如何在TFS 2010的Build-Deploy-Test构建中运行许多单元测试? - How do I run many unit tests in Build-Deploy-Test build in TFS 2010? 如何设置要在TFS Build Server中运行的单元测试的超时 - How can I set the Timeout for a unit test takes to run in TFS Build Server 如何调试Chutzpah / PhantomJS正在执行的JavaScript - How do I debug my JavaScript that is being executed by Chutzpah/PhantomJS 如何在tfs构建脚本中指定Visual Studio测试运行程序 - How do i specify Visual Studio test runner in tfs build script 我可以控制TFS Build Server上的Web项目的端口号吗? - Can I control Port Number of Web Projects on TFS Build Server? 如何仅在TFS服务器上运行32位版本的TestCases - How to run TestCases for 32-Bit build only on TFS server 如何在Xcode 4中获得测试和构建iPhone的代码覆盖率? - How do I get code coverage for tests and build for iPhone in Xcode 4?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM