VS2010 (Express) debugger trapping Ctrl+C in Console app

前端 未结 5 1001
梦毁少年i
梦毁少年i 2021-01-04 08:49

Summary of Answers

To avoid the debugger trapping Ctrl+C first turn off the Visual Studio Hosting Process (found in project pro

5条回答
  •  忘掉有多难
    2021-01-04 09:55

    Perhaps this is common knowledge by now but we were having the same problem when trying to stop a topshelf application using ctrl-c while being debugged in visual studio. In the end we figured that you need to turn off capturing control-c win32 exceptions when thrown (Debug->Exceptions, or ctrl d,e open Win32 Exceptions then uncheck control-c in the thrown column) and then also go to the project (that is running the service) properties and on the debug tab check the option enable unmanaged code debugging. We are using MS Visual Studio 2010 pro version 10.0.40219.1 SP1Rel.

提交回复
热议问题