Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 540
Ian Avatar asked Sep 10 '13 17:09

Ian


1 Answers

Here's one way,

Debug directly on the build server

  1. Connect to the build server manually through 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

And another way if setting up networking for the VS Remote Debugger isn't a huge pain,

Remote debug the tests on the build server

  1. Connect to the build server manually through RDP
  2. Start the Visual Studio Remote Debugging Monitor (needs to be downloaded/installed)
  3. On your own machine, open up the solution and set up the test project to run using the test runner (e.g. mstest) on the remote machine (see here for screenshots)
like image 184
makhdumi Avatar answered Sep 28 '22 15:09

makhdumi