Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created December 22, 2020 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonLaster/1136ae933e3583b40d635feb0e337789 to your computer and use it in GitHub Desktop.
Save jasonLaster/1136ae933e3583b40d635feb0e337789 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 9930d484..7eec265a 100644
--- a/src/devtools/client/debugger/src/actions/breakpoints/index.js
+++ b/src/devtools/client/debugger/src/actions/breakpoints/index.js
@@ -184,13 +184,18 @@ export function addBreakpointAtLine(cx, line, shouldLog = false, disabled = fals
};
const options = {};
- const file = source.url.split("/").pop();
- options.logValue = `"${file}:${line}"`;
+ options.logValue = getLogValue(source, location);
return dispatch(addBreakpoint(cx, breakpointLocation, options, disabled));
};
}
+function getLogValue(source, location) {
+ const { line, column } = location;
+ const file = getFilename(source);
+ return `"${file}:${line}:${column}"`;
+}
+
export function addBreakpointAtColumn(cx, location) {
return ({ dispatch, getState }) => {
const state = getState();
@@ -207,9 +212,9 @@ export function addBreakpointAtColumn(cx, location) {
line: line,
};
- const options = {};
- const file = source.url.split("/").pop();
- options.logValue = `"${file}:${line}:${column}"`;
+ const options = {
+ logValue: getLogValue(source, location),
+ };
return dispatch(addBreakpoint(cx, breakpointLocation, options));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment