locked
Where does the Debug Engine get the breakpoints from? RRS feed

  • Question

  • How does the Debug Engine create breakpoints?

    The Debug Engine returns the breakpoint with the function name etc, where does it get this information? is it completely from the process , w3wp.exe in my case, which is being debugged?

    I'm seeing child breakpoints in my debugger when debugging my own language (which has it's own Expression Evaluator)

    My implementation of IDebugExpressionEvaluator2.GetMethodProperty gets hit multiple times, once for each child breakpoint.




    http://learnerps-dotnet.blogspot.com

    Wednesday, April 18, 2012 11:29 AM

Answers

  • Hi learnerplates,

    >> How does the Debug Engine create breakpoints?

    We can try to use Breakpoints.Add Method to create a breakpoints. For example , we can use the following code to set breakpoints:

        EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;

        debugger.Breakpoints.Add("","Target001.cs", 13, 1, "",

                                 EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,

                                 "C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);

        debugger.Breakpoints.Add("","Target001.cs", 15, 1, "",

                                 EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,

                                 "C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);

    Reference:

    Breakpoints.Add Method

    http://msdn.microsoft.com/en-us/library/envdte.breakpoints.add(v=vs.100).aspx

    Debugger.Breakpoints Property

    http://msdn.microsoft.com/en-us/library/envdte.debugger.breakpoints.aspx

    Debugging Through the Debugger

    http://www.codeproject.com/Articles/34340/Debugging-Through-the-Debugger


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by lucy-liu Wednesday, April 25, 2012 7:00 AM
    Friday, April 20, 2012 5:35 AM

All replies

  • Hi learnerplates,

    >> How does the Debug Engine create breakpoints?

    We can try to use Breakpoints.Add Method to create a breakpoints. For example , we can use the following code to set breakpoints:

        EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;

        debugger.Breakpoints.Add("","Target001.cs", 13, 1, "",

                                 EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,

                                 "C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);

        debugger.Breakpoints.Add("","Target001.cs", 15, 1, "",

                                 EnvDTE.dbgBreakpointConditionType.dbgBreakpointConditionTypeWhenTrue,

                                 "C#","", 0, "", 0, EnvDTE.dbgHitCountType.dbgHitCountTypeNone);

    Reference:

    Breakpoints.Add Method

    http://msdn.microsoft.com/en-us/library/envdte.breakpoints.add(v=vs.100).aspx

    Debugger.Breakpoints Property

    http://msdn.microsoft.com/en-us/library/envdte.debugger.breakpoints.aspx

    Debugging Through the Debugger

    http://www.codeproject.com/Articles/34340/Debugging-Through-the-Debugger


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by lucy-liu Wednesday, April 25, 2012 7:00 AM
    Friday, April 20, 2012 5:35 AM
  • Hi learnerplates,

    I temporary make my last reply as answer. You can unmark it if they provide no help.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, April 25, 2012 7:01 AM