Visual Studio 2013 remote debugging, auto deploy?

孤者浪人 提交于 2019-12-08 15:07:46

问题


When I tried remote debugging with Windows Store applications (Metro applications), it was very easy. In the Start drop down I could choose one of the remote computer. Then VS built the project and automatically deployed the executable to the remote computer and ran it. It felt as if it were local debugging.

Now that I want to try remote debugging with an Windows application (simple C# Windows Forms), it was not that easy. I read the following page: http://msdn.microsoft.com/en-us/library/vstudio/8x6by8d2(v=vs.110).aspx

Does this mean I have to copy the built exe to the remote computer manually every single time when I build the project? Is there any way to make it work easily just like the Windows Store apps? Possibly a third-party extension or something?


回答1:


I recently set this up for a work project, and encountered your post after experiencing similar issues. I detailed my solution on my blog.

Remote Debugging with VS2015

I changed the output folder to be a network share that my debugging account has access to, and the project build just creates output at that location, making it available to the debugger. I simply press the play (Debug) button on my toolbar with the 'Remote Debug' profile selected.

  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.



回答2:


Does this mean I have to copy the built exe to the remote computer manually every single time when I build the project?

Yes.

Is there any way to make it work easily just like the Windows Store apps?

You can create a post-build event in which you can do practically everything. In this case you can set up a xcopy/robocopy command which would copy the stuff to a network location.

Possibly a third-party extension or something?

Don't think so.



来源:https://stackoverflow.com/questions/25813221/visual-studio-2013-remote-debugging-auto-deploy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!