Reputation: 14314
I am writing some integration tests for an ASP.NET MVC application, and I am wondering how you can get breakpoints to be hit in the web application after firing a web request at the application.
To give a bit more background, this is what is currently happening:
WebRequest
to an MVC action methodI know all this is working, as I am getting a 500 back, and my app is logging exactly where in the app an error is being thrown. However, this on it's own is not enough information, I would like the symbols to be loaded for the MVC app so that when I fire the request off I can hit a breakpoint in the web app.
Anyone any idea how to do this?
Upvotes: 0
Views: 1545
Reputation: 2227
As long as your app is compiled as Debug, you can attach to the IIS Express process from Visual Studio.
In visual studio, select Attach to process from the Tools menu, and select IIS Express from the list of processes.
After attaching to the process, make a request and it should stop at any breakpoints you have set.
Upvotes: 1
Reputation: 2709
There are a few ways to debug it.
Upvotes: 0