VS2015 cannot start local debugging on VPN error about remote debugger

北慕城南 提交于 2020-05-24 05:53:42

问题


Recently I started having issues starting a LOCAL EXE (winforms or console applications, VB.NET 4.0 framework target). To be clear I'm NOT doing remote debugging!

I am using AVAYA VPN client to connect to work but no networking should be needed to do local debugging.

If I disconnect the VPN it works normally again, so it is clearly related. But I have been using this VPN for years and until the last few weeks had not had this issue.

These are the 2 windows that popup when starting the program, the first one only pops up once after visual studio starts fresh, the second one occurs every time I try to run any project.

It appears VS2015 is confused and is trying to do remote debugging for no reason.

These are the things I tried so far

  • Run the project without debugging (compiles and works fine)
  • Restart VS (2015).
  • Restart computer.
  • Create fresh new project with minimal code (problem still exists).
  • Enable remote debugging, run, then disable remote debugging.
  • Clean Solution, Rebuild Solution.

If anyone has any suggestions or had similar issue and a way to correct it, please assist, this is killing me. :)

NEW INFO

I changed the project to x86 and it now runs. So this seems to be related to 64bit debugging. Possibly the remote debugger is used to connect to the 64bit process from the 32bit visual studio. This at least gives me a work around but would still like 64bit debug to work while on VPN.

If Visual Studio is already been debugging before the VPN connects, after you connect msvsmon.exe crashes immediately.


回答1:


You need to run Visual studio remote debugger on your local machine as Administrator (it's important to run as administrator) after that Visual studio will be able to attach to process over VPN.

UPDATE: there is a Qualifier, you have to choose your remote debugger session instead of local machine, press find button and you will see it, it may have name MachineName:RemoteDebuggerPort, or IP address like in my case on screenshot

Remote debugger location for VS2017: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Remote Debugger\x64\msvsmon.exe




回答2:


I had the same problem with Visual Studio 2017 and Cisco AnyConnect VPN. I had to jump through a few more hoops to get this working.

  1. Start the 64-bit MSVSMON as described in the other answer.
  2. In the project settings, select "Remote Windows Debugger".
  3. Set "Remote Command" to $(TargetPath).
  4. Set "Remote Server Name" to 127.0.0.1:port where 'port' is taken from the output of MSVSMON (in my case, 4022).


来源:https://stackoverflow.com/questions/33418105/vs2015-cannot-start-local-debugging-on-vpn-error-about-remote-debugger

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