break points RRS feed

  • Question

  • How do I add a break/debug point to a c# file. I have an addin that is generating code at build time and it is clearing debug points as it generates the code. I am planning to save the positions of the debug points and then insert them again.

    Thanks in advance
    Tuesday, September 11, 2007 11:50 PM


  • You may be able to use the EnvDTE.Debugger.Breakpoints collection property for this. I'm not certain if this will actually be possible though, as your code generation may change the sources enough, so that the original BP locations are not the same.


    But you should be able to enumerate through the Breakpoints collection and add new ones using EnvDTE.Debugger.Breakpoints.Add.



    Wednesday, September 12, 2007 5:07 PM