Visual Studio Community 2022 Debugger not working for C#

EasyPeasy 20 Reputation points
2023-09-03T15:03:23.7+00:00

Hello! After the last patch for Visual Studio 2022 (17.7.3), I tried running the web application that I made and at some point I ran into an issue. I tried using the debugger, but it was not working. Any breakpoint that I set, either in .cs files or .cshtml files, were not seen at the start of the debugging session. When I hover over the hollow debugging circle, it says "The breakpoint will not currently be hit. No symbols have been loaded for this document.". I searched online for this issue of course and no answers that I managed to find online helped until this point.

The most "important" breakpoint that I was trying to set was in a Controller which was returning some null result from an edit function. The path shown in the web page was the same as the path of my controller and the application itself was not created to run on multiple processes (although this is not really relevant because I am starting the application through visual studio, not connecting the debugger to a process, but I noticed that some people asked about this).

I hope this can be solved soon

Developer technologies | Visual Studio | Debugging
Developer technologies | C#
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-09-08T10:17:21.2466667+00:00

    Hi @EasyPeasy

    Welcome to Microsoft Q&A! 

    Does it occur in other projects? 

    Please ensure that the build configuration is set to debug not release.

    You can go to Tools > Options > Debugging > General > disable Just My Code. 

    For the error message, you can also refer to: Troubleshooting breakpoints

    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.

     

    2 people found this answer helpful.

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.