Skip to content

Commit 8658bf4

Browse files
committed
Add JS breakpoint into Debug.assert failure
I was talking to @DanielRosenwasser the other day and mentioned this - it's been a floating patch that I keep reapplying on top of my own changes locally. Turns out, it's pretty useful to have a preset breakpoint when an assertion is violated.
1 parent 402baba commit 8658bf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ namespace ts {
832832
if (verboseDebugInfo) {
833833
verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
834834
}
835-
835+
debugger;
836836
throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
837837
}
838838
}
@@ -851,4 +851,4 @@ namespace ts {
851851
}
852852
return copiedList;
853853
}
854-
}
854+
}

0 commit comments

Comments
 (0)