Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Not hitting breakpoint in visual studio 2012 [closed]

I have a mvc c# web application i am building in vs 2012, I put a breakpoint on the controller but that breakpoint is never hit, i get the results so i know that code is running. whats weird is that it doesnt even give the error "no symbols have been loaded" and make the break point hollow. the break point remains solid. Any ideas whats happening?

like image 307
PUG Avatar asked Jun 07 '13 19:06

PUG


Video Answer


1 Answers

To debug step-by-step, you must do two things. First you must set the breakpoint, then you must attach the debugger to the process running your code. In this case the process that is running your code will be w3wp.exe. If you press CTRL + ALT + P, you'll get to the attach to process window. You won't see w3wp here, but check the two boxes at the bottom of the window to show all processes in all sessions and from all users, and then you'll be able to attach to it. Note that if it still doesn't appear, it's because w3wp hasn't been launched yet, so you need to do a request to your web application to spin it up. After attaching, the break point should be hit if the code matches.

like image 158
Haney Avatar answered Sep 24 '22 07:09

Haney