0

I've got a series of breakpoints in my code on each Catch block to easily allow me to halt the program if something fails.

However, when another user checks out the page and adds code, my breakpoints aren't on the right spots any more. Say they add four lines of code, my breakpoints are not four lines before the catch blocks now.

I grasp that the data is local to me, and is based on line number and not contents of said line. Having said that, can anyone think of a way around that?

Indeed, having breakpoints at the catch blocks would be useful for ALL members of the team - is there a way to set, I dunno, universal breakpoints that everyone can see and use?

VBartilucci
  • 477
  • 6
  • 17

1 Answers1

1

Rather than setting a multitude of breakpoints, would it be simpler for you to set the exception handling of thrown exceptions (possibly only those of actual interest, rather than all of them) to break in Debug | Exceptions?

I will first disagree with the assumption that breakpoints on all catch blocks are useful at all. (Though this will vary depending upon how prolific try/catch wrappers are in your codebase; a well applied practice of throw-early/catch-late could make such a strategy useful rather than debilitating).

As noted on Where are Visual Studio breakpoints saved? the action you'd have to take to share the breakpoints is not recommended.

Community
  • 1
  • 1
Tetsujin no Oni
  • 7,300
  • 2
  • 29
  • 46