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

前端 未结 5 960
梦毁少年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:29

    There seems to be a bug in VS 2010 debugger / .NET 4 that you get a strange 'no symbols' window when Ctrl+C is pressed in a console application with only managed debugging. There is a work-around to enable mix-mode debugging. The bug says 'fixed', but if other folks are hitting this please report it on the connect bug so the fix gets into a hotfix / SP.

    I saw this while debugging a service that uses TopShelf library to host a windows service which also lets you debug the service locally as a console application.

    https://connect.microsoft.com/VisualStudio/feedback/details/524889/debugging-c-console-application-that-handles-console-cancelkeypress-is-broken-in-net-4-0?wa=wsignin1.0

    Related Links: TopShelf, (came from MassTransit)

    Update: It seems the connect bug is for VS 2010 Beta, but I'm seeing the strange 'no source available' in managed-only debugging with VS 2010 RTM with what I believe to be the latest hotfixes.

提交回复
热议问题