Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup remote debugging with a different directory

I have a c# visual studio 2013 project. I want to use remote debugging. When setting a directory on the remote machine which is identical to the local machine (ie c:\project) it works great, but I have a special directory structure dictated by my TFS and even located on another drive which is not present on the remote machine (e:). I want to know how to define a different working directory on the remote machine from the local one.

like image 415
CaptainNemo Avatar asked Aug 06 '15 15:08

CaptainNemo


2 Answers

How I got around this in Visual Studio 2015 (which is probably still relevant) is by making another build configuration for remote debugging, with the output folder set to a Windows Share on the remote machine. You can secure it with Windows Authentication, and hide the share with the 'hiddenShare$' notation.

I detail it on my blog and reference the corresponding MSDN articles here:

Remote Debugging with VS2105

I also offered a similar answer to a similar question, here:

Visual Studio 2013 remote debugging, auto deploy?

  1. Open Configuration Manager for the solution
  2. Add a new configuration and name it appropriately. Select the box to automatically do so for all projects.
  3. Open the project properties of the executable project you wish to remotely debug.
  4. Ensure that the remote debugging profile is selected.
  5. Set the build output to the network share on the remote debugging computer.
  6. Set the remote debugging host address and port.
like image 118
Élie Avatar answered Oct 01 '22 12:10

Élie


Found another workaround:

Create a small virtual disk how to. Create a batch for copying

xcopy [source] [destination] /s /e /y

Just execute batch before debugging.

It should work.

like image 35
Madagaga Avatar answered Oct 01 '22 12:10

Madagaga