Moving to a breakpoint dynamically

  • Thread starter Thread starter A
  • Start date Start date
A

A

Does anyone have any idea how to get the environment to break on a line of
code dynamically? For instance, lets say that I throw an error and want to
debugger to break on line number X when that happens.

???

Thanks
 
A,
I believe System.Diagnostics.Debugger's Break method is what you are after.
 
You can use System.Diagnostics.Debugger.Launch() in most environments.
If you have a web application, you might need to adjust permissions
first.
 
Back
Top