Visual Studio 2022 - break points

Dejan Lukic 1 Reputation point
2022-12-14T15:39:58.483+00:00

I have switched from VS 2017 to VS 2022.
Now execution stops every time I encounter an exception in the try {} block.
I would like to continue execution instead and ignore exceptions within the try block.

Is there a solution to this?

Developer technologies Visual Studio Debugging
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2022-12-15T08:13:41.397+00:00

    Hello @Dejan Lukic ,

    Welcome to Microsoft Q&A forum.

    The debugger will now stop on NullReference exceptions when they are thrown. Can you confirm if the executions stop for NullReference exceptions, on your side? If so, please try to uncheck it from Debug > Windows > Exception Settings > Common Language Runtime Exceptions > System.NullReferenceException.

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

  2. RLWA32 49,536 Reputation points
    2022-12-15T10:35:02.307+00:00

    The VS2022 debugger can break when exceptions are thrown for various platforms. For example, the following image shows the types of exceptions for which the debugger's behavior can be controlled. The image shows that for most platforms some but not all of the exceptions will cause the debugger to break.

    271021-allexceptions.png

    You should tell us the type of project you are working with and the specific exceptions for which you want the debugger to continue execution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.