2

Using any JS dev tools is there a way to programmatically create a debugger break point? I'm using chrome, but don't mind to switch to a different environment supporting the feature.

2 Answers 2

3

It never was so simple. Anywhere you want in JS place the statement:

debugger;

If the Chrome debugger is open, it will break there.

Sign up to request clarification or add additional context in comments.

Comments

-1

Use alert() , that should do the trick.

2 Comments

What part of "programmatically" did you misunderstand?
can I get access to the context vars, which is the most interesting part, I know that the line I'm trying to debug gets hit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.