0

I am using VS 2019 (VB.net) and I can not edit and continue when debugging when I have "On error goto" I use this feature with no problem in VS 2012 (VB.net).

How to make edit and continue work with "On error goto" statement in VS 2019 (VB.net)?

Thanks in advance.

  • 4
    Any use of `On Error` in VB.NET is garbage. It has no place in VB.NET code except in upgraded VB6 code that already included it. Get rid of it and write proper VB.NET code, i.e. use `Try...Catch` for exception handling. – jmcilhinney Dec 29 '20 at 16:19
  • 2
    As a sinner who has committed the same sin, I plead you to not do the same and immediately remove any application logic driven by On Error Goto – Steve Dec 29 '20 at 17:40
  • 1
    In .net use `try-catch-finally` – T.S. Dec 30 '20 at 03:39
  • 1
    As suggested in the [document](https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/on-error-statement#remarks) : We recommend that you use structured exception handling in your code whenever possible, rather than using unstructured exception handling and the On Error statement. For more information, see [Try...Catch...Finally](https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/try-catch-finally-statement) Statement. – Xingyu Zhao Dec 30 '20 at 05:37

0 Answers0