Created
December 22, 2020 18:14
-
-
Save jasonLaster/1136ae933e3583b40d635feb0e337789 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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