Visual Studio 2010 Automatic Attach To Process

后端 未结 10 2238
谎友^
谎友^ 2021-02-07 08:51

I am using visual studio 2010, my application has a multiu layer architect,

MainUI, WCFService, BLL and DAL

My MainUI communicated to WCF and WCF further commun

相关标签:
10条回答
  • 2021-02-07 09:45

    Try using System.Diagnostics.Debugger.Break() in the code. If a debugger is not attached, then running that code will ask to attach a debugger and you can choose the existing instance.

    0 讨论(0)
  • 2021-02-07 09:45

    Have you tried System.Diagnostics.Debugger.Launch() in your service you would like the debugger to attach to?
    http://msdn.microsoft.com/en-us/library/system.diagnostics.debugger.launch.aspx

    0 讨论(0)
  • 2021-02-07 09:49
    1. In the properties page for the wcf service project, select the Web tab.
    2. Select 'Start External Program' for the start action, and choose MainUI.exe.
    3. Set the working directory as the folder that MainUI.exe is in (probably a bin folder).
    4. Set a break point and press f5 to start debugging.
    0 讨论(0)
  • 2021-02-07 09:52

    Here is a detained article that explains how to do this...You can customize this macro.

    http://sivablogz.wordpress.com/2013/04/08/running-an-application-and-attaching-to-the-process-with-a-macro-in-visual-studio/

    0 讨论(0)
提交回复
热议问题