Visual Studio 2015: debugging MVC controller
13,590
To debug a MVC solution:
Attach to Running Processes with the Visual Studio Debugger:
- Build your solution and open your site on any web browser.
- Place your breakpoint(s) in your server side code.
- Under Debug > Choose Attach to process (Or ctrl+alt+p)
- In the process list, choose the w3wp.exe or iisexpress.exe process (depending on your project type), and click attach.
- Wait for visual Studio to load all relevant symbols referenced by your project (this might take a while).
- Once all symbols are loaded, the debug point should turn Red.
This means that you can now use your web site and reach an active breakpoint.
Author by
jeanie77
Updated on June 27, 2022Comments
-
jeanie77 almost 2 years
I'm developing a Word Add-in and I changed the default web project to a custom ASP.NET MVC project. I tried adding a breakpoint to a certain method on controller but it's not reached.
Is there something I could do to debug the server side C# code, as if it were a normal web project?
-
Koby Douek about 7 years@jeanie77 Happy to help! Happy coding, peace and love.