On debugging, Visual Studio breaks at the start of Program.Main

Sylvain 216 Reputation points
2022-02-16T16:33:36.413+00:00

Hi,

I see a strange behavior with the debugger of Visual Studio 2019 (v16.11.5).

When I start the debugging of my application, the debugger always stop at the beginning of the Program.Main method, even if there is no breakpoint at all!
See screenshot attached, I just hit F5 to start debugging and Visual Studio waits for me to continue (like if I had hit F10 or F11 instead of F5):
174956-2022-02-16-17-26-36-window.png

It does so with IIS Express of native debugging, I also tried many browsers and with script disabled... I have no clue...

Thanks!

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

Accepted answer
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2022-02-17T03:12:18.237+00:00

    Hi @Sylvain ,

    Welcome to Microsoft Q&A!

    If you create a new project and copy the code into new project, does it repro?

    Please navigate to Debug > Delete All Breakpoints.
    Then, close all instances of Visual Studio, delete the .vs folder in your project folder and rebuild your project.

    Sincerely,
    Anna
    *
    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 additional answers

Sort by: Most helpful

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.