debugger
debugger copied to clipboard
[Paused] Highlight the debug line red on errors
It would be sweet if the debugger could show you that it's paused on an exception based on the debug line color:
Here's a rough sketch
diff --git a/src/components/Editor/index.js b/src/components/Editor/index.js
index d85e265..16ec036 100644
--- a/src/components/Editor/index.js
+++ b/src/components/Editor/index.js
@@ -166,10 +166,10 @@ class Editor extends PureComponent {
}
if (this.props.outOfScopeLocations !== nextProps.outOfScopeLocations) {
- clearLineClass(this.editor.codeMirror, "out-of-scope");
+ clearLineClass(this.editor.codeMirror, "out-of-scope", this.props.pauseInfo.why);
}
- this.setDebugLine(nextProps.selectedFrame, selectedLocation);
+ this.setDebugLine(nextProps.selectedFrame, selectedLocation, nextProps.pauseInfo.why);
resizeBreakpointGutter(this.editor.codeMirror);
}
@@ -588,25 +588,29 @@ class Editor extends PureComponent {
}
}
+ getDebugLineClass(whyPaused) {
+ return whyPaused.error ? "new-debug-line" : "new-debug-line-error"
+ }
+
clearDebugLine(selectedFrame) {
if (selectedFrame) {
const line = selectedFrame.location.line;
this.editor.codeMirror.removeLineClass(
line - 1,
"line",
- "new-debug-line"
+ this.getDebugLineClass(whyPaused)
);
}
}
:
/claim
Thanks for claiming the issue! :wave:
Here are some link for getting setup, contributing, and development tips. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!