How to Edit and Continue out of of a Catch block?

74 Views Asked by At

I recently reinstalled Windows and VS 2022 along with it. Now I can't get all of my old Edit and Continue functions working.

Specifically, being able to Edit and Continue out of a Catch block - it is working fine otherwise. I am getting the "Unable to set the next statement. The attempt to unwind the callstack failed" error when I try to Set Next Statement after an edit.

Previously I would hit a Catch, make a change to the code, Set Next Statement and be on my merry way. The trick was I had to make a change, if I just Set Next Statement to rerun a section of code, I got an error (I do not recall what the error was.) It was not the slickest workflow - but it worked really well for this particularly unique legacy VB.Net project I am constantly fussing with (long story, just roll with it!)

Any idea what voodoo magic settings I need to reenable this?

1

There are 1 best solutions below

2
Mike On

Sorry for the 'answer' I can not add comments yet - not enough rep points.

Have you tried putting a try block in the for loop?

For x = 0 to Whatever
  Try
    doSomething
  Catch Ex As Exception
    DoSomethingElse
  Finally
  ' this gets executed whatever, error or not
  End Try
Next x`