Can I pause execution from within JS code? I am working on a simple haxe-based debug util, and I want to be able to simulate breakpoints, by calling a util method which will trigger the execution pause.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure if this is what you’re looking for, but in Chrome (and Firefox if Firebug is installed) you can use the built-in JavaScript
debuggerstatement. This causes the execution to pause, and is effectively like setting a breakpoint. For example, the following would break on every iteration of the loop allowing you to examine the value ofi(stupidly simple example):