asp.net - How to debug JavaScript in Firebug in Firefox -


i have web application in asp.net 2.0

i have following image in firebug

enter image description here

when debug javascript using f10 whole line no 67 gets executed in 1 go, when press f10 again line 68 gets executed

so in line no 67 there more 1 statements , executed in 1 go.

so how debug statement statement in firebug ??

thanks.

this common problem when debugging minified javascript code.

ideally should debugging non-minified javascript. if site, should swap out js code dev versions while you're testing.

if it's library, lot of third party tools provide .min.js version , plain .js version, swap out .min.js , use .js` instead now. if it's own code, should have original code hand anyway.

having said that, if it's library code, odds don't need debug anyway; problem in own code, not in library. set break point in own code, , step on library calls.

if must test site using minified code, need use technology called "source maps" you.

a source map keeps set of links betweeen original un-minified js code , minified version being run. allows debug site using minified code, see original un-minified code in debugger.

this relatively new technology. know it's available in chrome. i'm not sure whether it's available in firebug yet though. might want investigate bit further. if isn't available yet, soon. (maybe take @ beta version or nightlies)

of course if available, in order use need have original source code , source map debugger can mapping. again, third party libs should provide these you. own code, you'll need generate map part of minifying process.

further reading source maps: http://net.tutsplus.com/tutorials/tools-and-tips/source-maps-101/

hope helps.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -