Reputation:
Can we set a breakpoint in javascript(jquery) code in a asp.net MVC 3 view? I want to debug it because I have to.
I used F12 in IE 9 but no clue.
Upvotes: 3
Views: 6384
Reputation: 1620
You can use developer tools of your browser.... just press F12 (chrome, ie)
must set the break points on the js source... and play with your page.
I use chrome... Chrome developer tools tutorial
Upvotes: 1
Reputation: 82287
Visual Studio doesn't play very nicely with javascript debugging, and neither does IE.
Try using Firefox's Script tab in FireBug, you can set breakpoints there and then refresh or reload the page to hit the breakpoint. It allows step by step execution.
Or in chrome, try going to sources, then with the small icon in the top left of the tab, select the script you want to debug. Clicking on one of the line numbers will set a breakpoint for that item. You will notice that when clicking refresh after doing this there are a few options. Any will do, but a normal refresh works to hit the breakpoint.
Upvotes: 3