Search code examples
javascriptjqueryasp.net-mvcvisual-studio-2010visual-web-developer-2010

How to debug JavaScript that's the result of an XHR


My ASP.NET MVC app makes an XHR request from within a view, and retrieves another partial view. This partial view wires some event handlers.

I would like to set a break-point in the event handler of these partial views and debug it.

I have IE 9, Firefox 14.0.1 and Chrome 28.0.1500.5.

I am using Visual Web Developer 2010 Express.


Solution

  • In the XHR success function, just add debugger; - docs

    Open your browser in dev tools mode and the js will auto break at that line.