// In addition to TopHacker's answer console.assert(/** Condition **/, /** Error message **/); console.trace(); debugger; // will force execution halt at the line where this is written allowing code inspection