mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 16:38:46 -05:00
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.
This commit is contained in:
@@ -832,7 +832,7 @@ namespace ts {
|
||||
if (verboseDebugInfo) {
|
||||
verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
|
||||
}
|
||||
|
||||
debugger;
|
||||
throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
|
||||
}
|
||||
}
|
||||
@@ -851,4 +851,4 @@ namespace ts {
|
||||
}
|
||||
return copiedList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user