开发者

Delay in javascript debugging

开发者_运维知识库I have many linked Javascript files which I need to debug from the point they start executing. I am using the inbuilt debugger in chrome for this purpose. But by the time I am able to open the debugger, the script has already completed the part I want to debug. So, is there a standard way built in chrome (or any other debugger, though I would like to stick to chrome) to stall the execution for debugging. I want to avoid putting a delay like function in my script.

Also, reloading the script is not an option for me.


Set a breakpoint in Developer Tools. When the interpretor gets to that line, it will break, allowing you to examine a few things.

Delay in javascript debugging

Not the best example, because Stack Overflow's JavaScript is minified, but you get the idea.


just write

function name() 
{    
         debugger;
        // you code 
  }

in you code

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜