As I circumvented this in Visual Studio 2015 (which is probably still relevant), I did another build configuration for remote debugging, and the output folder was installed on Windows Share on the remote computer. You can protect it with Windows Authentication and hide the share with the "hiddenShare $" entry.
I will talk about this in detail on my blog and talk about the relevant MSDN articles here:
Remote debugging with VS2105
I also suggested a similar answer to a similar question:
Visual Studio 2013 remote debugging, automatic deployment?
- Open Configuration Manager to resolve
- Add a new configuration and name it accordingly. Check the box to automatically do this for all projects.
- Open the project properties of the executable project that you want to debug remotely.
- Make sure the remote debug profile is selected.
- Set the assembly output to a network share on the remote computer for debugging.
- Set the address and port of the remote debug host.
source share