Visual Studio 2022 Debugging guide with ASP.NET Core 6.0 - Breakpoints Not Hitting
I'm stuck on something that should probably be simple. I've looked through the documentation and I'm still confused about I'm having trouble with Visual Studio 2022 while debugging my ASP.NET Core 6.0 application. I set breakpoints in my controller, but they aren't being hit during execution. I've checked that my code is being executed, as I'm logging some information in the controller methods, but the debugger just skips over the breakpoints without stopping. Hereβs a brief overview of my setup: - Operating System: Windows 11 Pro - Visual Studio Version: 17.0.0 - ASP.NET Core Version: 6.0.0 I've tried several solutions: 1. Ensured that the project is set to run in Debug mode rather than Release mode. 2. Cleaned and rebuilt the solution several times. 3. Verified that the project is running with the correct launch settings in `launchSettings.json`: ```json { "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, "MyWebApp": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } } } ``` 4. Checked if the symbols are being loaded correctly by going to Debug > Windows > Modules and ensuring that my assembly's symbols are loaded. I also noticed that I occasionally get the following warning in the Output window when starting the debugger: ``` The breakpoint will not currently be hit. No symbols have been loaded for this document. ``` I can see my project is running, and the logs indicate that requests are reaching the controller, so I'm puzzled why the debugger isn't stopping at my breakpoints. What should I do to troubleshoot this scenario? Are there any common pitfalls or specific configurations I might be missing? This issue appeared after updating to C# LTS. What's the correct way to implement this? My development environment is Ubuntu 22.04. Any feedback is welcome!