Razi
Razi

Reputation: 11

debugging not working in javaScript code, in asp .net MVC4 application

I am building an application in asp .net MVC4 and I face a problem while debugging javaScript code, and I found this error on my breakpoint,

"The breakpoint will not currently be hit. No symbols have been loaded for this document."

But debugging in controller classes works correctly for me.

Please give me some favour if you know the solution.

Upvotes: 1

Views: 1875

Answers (2)

Suman Bogati
Suman Bogati

Reputation: 6351

Put the statement debugger; into code of javascript file where you want to add breakpoint. Something like,

function addValue(){
  var a = 10;
  var b = 20;
  debugger; // <= here will be added break point 
            //when you access your page in browser 
  var result = a+b;
  return debugger;
}

More about debugger

Upvotes: 2

bnieland
bnieland

Reputation: 6516

Most likely, your browser is not loading the version of the .js file where the breakpoint is placed.

solutions:

  • Hard refresh page with F5
  • Close all your browser instances and
  • reload page Use F12 tools in IE and select in the network panel "Always load from server".

Upvotes: 0

Related Questions