Thursday, August 21, 2014

Trigger breakpoint in Javascript

To trigger breakpoint in Javascript, you can add a 'debugger' in your code. For example:

function testing() {
    alert(123);
    debugger;
    alert(456);
}

The debugger will be triggered at runtime.

No comments:

Post a Comment

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...