When requesting through ajax, one of the attributes cache is true by default, except when the type is script and jsonp. You can let the browser cache the js file you requested, and then perform breakpoint debugging. You can try setting this up.
The poster said it cannot be debugged because the code returned by get is eval或者是new Function去执行了,代码在内存中,所以找不到,其实如果代码里面有console.log,你会看到控制台打印的代码的行数未VM:xxxx, which means the code is in memory. Solution: Save the code returned by get locally, and then write a page to run this code, and you can debug it,
When requesting through ajax, one of the attributes cache is true by default, except when the type is script and jsonp. You can let the browser cache the js file you requested, and then perform breakpoint debugging.
You can try setting this up.
The poster said it cannot be debugged because the code returned by get is
eval
或者是new Function
去执行了,代码在内存中,所以找不到,其实如果代码里面有console.log
,你会看到控制台打印的代码的行数未VM:xxxx
, which means the code is in memory.Solution: Save the code returned by get locally, and then write a page to run this code, and you can debug it,