Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created March 4, 2019 15:47
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/e07155cced2f5f906c64010c2cb781ba to your computer and use it in GitHub Desktop.
Save jasonLaster/e07155cced2f5f906c64010c2cb781ba to your computer and use it in GitHub Desktop.
diff --git a/devtools/server/actors/breakpoint.js b/devtools/server/actors/breakpoint.js
index 565a826d9f30..22425378938c 100644
--- a/devtools/server/actors/breakpoint.js
+++ b/devtools/server/actors/breakpoint.js
@@ -214,16 +214,17 @@ BreakpointActor.prototype = {
}
if (logValue) {
- const completion = frame.eval(logValue);
+ const completion = frame.eval(`[${logValue}]`);
let value;
if (!completion) {
// The evaluation was killed (possibly by the slow script dialog).
- value = "Log value evaluation incomplete";
+ value = ["Log value evaluation incomplete"];
} else if ("return" in completion) {
value = completion.return;
} else {
- value = this.getThrownMessage(completion);
+ value = [this.getThrownMessage(completion)];
}
+
if (value && typeof value.unsafeDereference === "function") {
value = value.unsafeDereference();
}
@@ -232,7 +233,7 @@ BreakpointActor.prototype = {
filename: url,
lineNumber: generatedLine,
columnNumber: generatedColumn,
- "arguments": [value],
+ "arguments": value,
};
this.threadActor._parent._consoleActor.onConsoleAPICall(message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment