Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created October 26, 2020 16:50
Show Gist options
  • Select an option

  • Save jasonLaster/b9a798131b8d1505cc0e53debb9776e7 to your computer and use it in GitHub Desktop.

Select an option

Save jasonLaster/b9a798131b8d1505cc0e53debb9776e7 to your computer and use it in GitHub Desktop.
diff --git a/src/devtools/client/debugger/src/actions/breakpoints/index.js b/src/devtools/client/debugger/src/actions/breakpoints/index.js
index 90951cac..185da45e 100644
--- a/src/devtools/client/debugger/src/actions/breakpoints/index.js
+++ b/src/devtools/client/debugger/src/actions/breakpoints/index.js
@@ -28,11 +28,7 @@ export * from "./breakpointPositions";
export * from "./modify";
export * from "./syncBreakpoint";
-export function addHiddenBreakpoint(cx, location) {
- return ({ dispatch }) => {
- return dispatch(addBreakpoint(cx, location, { hidden: true }));
- };
-}
+
/**
* Disable all breakpoints in a source
diff --git a/src/devtools/client/debugger/src/actions/pause/paused.js b/src/devtools/client/debugger/src/actions/pause/paused.js
index dba94af4..13cc7bb5 100644
--- a/src/devtools/client/debugger/src/actions/pause/paused.js
+++ b/src/devtools/client/debugger/src/actions/pause/paused.js
@@ -4,8 +4,6 @@
//
import {
- getHiddenBreakpoint,
- isEvaluatingExpression,
getSelectedFrame,
getThreadContext,
} from "../../selectors";
@@ -42,11 +40,6 @@ export function paused({ executionPoint }) {
dispatch(selectLocation(cx, frame.location, { remap: true }));
}
- const hiddenBreakpoint = getHiddenBreakpoint(getState());
- if (hiddenBreakpoint) {
- dispatch(removeBreakpoint(cx, hiddenBreakpoint));
- }
-
const promises = [];
promises.push(
(async () => {
diff --git a/src/devtools/client/debugger/src/components/Editor/Breakpoint.js b/src/devtools/client/debugger/src/components/Editor/Breakpoint.js
index 230d8fb9..fc262bb8 100644
--- a/src/devtools/client/debugger/src/components/Editor/Breakpoint.js
+++ b/src/devtools/client/debugger/src/components/Editor/Breakpoint.js
@@ -95,11 +95,6 @@ class Breakpoint extends PureComponent {
const { breakpoint, editor, selectedSource } = props;
const selectedLocation = breakpoint.location;
- // Hidden Breakpoints are never rendered on the client
- if (breakpoint.options.hidden) {
- return;
- }
-
if (!selectedSource) {
return;
}
diff --git a/src/devtools/client/debugger/src/reducers/breakpoints.js b/src/devtools/client/debugger/src/reducers/breakpoints.js
index eef759b3..865cc9ab 100644
--- a/src/devtools/client/debugger/src/reducers/breakpoints.js
+++ b/src/devtools/client/debugger/src/reducers/breakpoints.js
@@ -186,11 +186,6 @@ export function getBreakpointForLocation(state, location) {
});
}
-export function getHiddenBreakpoint(state) {
- const breakpoints = getBreakpointsList(state);
- return breakpoints.find(bp => bp.options.hidden);
-}
-
export function hasLogpoint(state, location) {
const breakpoint = getBreakpoint(state, location);
return breakpoint && breakpoint.options.logValue;
diff --git a/src/devtools/client/debugger/src/reducers/pending-breakpoints.js b/src/devtools/client/debugger/src/reducers/pending-breakpoints.js
index 5d36e10f..1cc7e249 100644
--- a/src/devtools/client/debugger/src/reducers/pending-breakpoints.js
+++ b/src/devtools/client/debugger/src/reducers/pending-breakpoints.js
@@ -31,10 +31,6 @@ function update(state = {}, action) {
}
function setBreakpoint(state, { breakpoint }) {
- if (breakpoint.options.hidden) {
- return state;
- }
-
const locationId = makePendingLocationId(breakpoint.location);
const pendingBreakpoint = createPendingBreakpoint(breakpoint);
diff --git a/src/devtools/client/debugger/src/selectors/visibleColumnBreakpoints.js b/src/devtools/client/debugger/src/selectors/visibleColumnBreakpoints.js
index 784adaea..44295c1c 100644
--- a/src/devtools/client/debugger/src/selectors/visibleColumnBreakpoints.js
+++ b/src/devtools/client/debugger/src/selectors/visibleColumnBreakpoints.js
@@ -33,7 +33,6 @@ function groupBreakpoints(breakpoints, selectedSource) {
}
const map = groupBy(
- breakpoints.filter(breakpoint => !breakpoint.options.hidden),
breakpoint => breakpoint.location.line
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment