调试js 也要关注它的调用过程(debugging jquery error )
访问量: 3321
这几天发现了一个奇怪的JQUERY问题,页面加载后,打开developer tools, 发现有的页面有JS错误提示,说jquery.js 79行 有问题,有的页面就没有。 ( these days I am struggling about a jquery problem. when the page is loaded, the 'developer tool' complaints that there's a js error, saying that jquery.js has problems on line 75.
很奇怪,jquery.js 这个源文件内容是完整的,正确的。没问题啊~~~ (but it's obviously that the jquery.js file is normal and correct )
我甚至做了diff, 一点一点的排查正常页面和问题页面的区别,也没发现,直到昨天下午,点了一下developer tools 中提示JS错误的向下的箭头,才发现这个JS 出错提示,是可以打开的( back stack trace ... ) 可以查看所有JS代码的调用过程。 ( I didn't find any problem after 'diff' the good page and the problem-page, until yesterday afternoon, I clicked the '->' right arrow of the error message on developer tool. )
终于发现,根源在另外一个js 文件中。。。 呵呵。。。于是问题很快解决了~ ( and I found the root cause of this error. now problem solved! )