-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
consoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocol
Description
- Version: v12.11.1
- Platform: Darwin 10.14
What steps will reproduce the bug?
With a debugger attached, invoke:
console.group('group name', { foo: true });
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
There should be a single CDP message for the console group. Running that line of code in the Chrome devtools, that is the case and I get a single message:
What do you see instead?
Running that line of code in Node.js, I get two messages--the correct startGroup
type, and then an additional log message whose stack says it comes from the group
method in internal/console/constructor.js
{"method":"Runtime.consoleAPICalled","params":{"type":"startGroup","args":[{"type":"string","value":"group name"},{"type":"object","className":"Object","description":"Object","objectId":"{\"injectedScriptId\":1,\"id\":1}","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"foo","type":"boolean","value":"true"}]}}],"executionContextId":1,"timestamp":1582746620974.181,"stackTrace":{"callFrames":[{"functionName":"","scriptId":"97","url":"file:///Users/copeet/Github/vscode-pwa/demos/node/main.js","lineNumber":1,"columnNumber":8},{"functionName":"Module._compile","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":944,"columnNumber":29},{"functionName":"Module._extensions..js","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":961,"columnNumber":9},{"functionName":"Module.load","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":797,"columnNumber":31},{"functionName":"Module._load","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":710,"columnNumber":11},{"functionName":"Module.runMain","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":1013,"columnNumber":9},{"functionName":"","scriptId":"39","url":"internal/main/run_main_module.js","lineNumber":16,"columnNumber":10}]}}}
{"method":"Runtime.consoleAPICalled","params":{"type":"log","args":[{"type":"string","value":"group name"},{"type":"object","className":"Object","description":"Object","objectId":"{\"injectedScriptId\":1,\"id\":2}","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"foo","type":"boolean","value":"true"}]}}],"executionContextId":1,"timestamp":1582746620974.757,"stackTrace":{"callFrames":[{"functionName":"group","scriptId":"25","url":"internal/console/constructor.js","lineNumber":385,"columnNumber":11},{"functionName":"","scriptId":"97","url":"file:///Users/copeet/Github/vscode-pwa/demos/node/main.js","lineNumber":1,"columnNumber":8},{"functionName":"Module._compile","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":944,"columnNumber":29},{"functionName":"Module._extensions..js","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":961,"columnNumber":9},{"functionName":"Module.load","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":797,"columnNumber":31},{"functionName":"Module._load","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":710,"columnNumber":11},{"functionName":"Module.runMain","scriptId":"43","url":"internal/modules/cjs/loader.js","lineNumber":1013,"columnNumber":9},{"functionName":"","scriptId":"39","url":"internal/main/run_main_module.js","lineNumber":16,"columnNumber":10}]}}}
Additional information
For now I can look for this behavior inside our debugger and ignore logs that come from the 'group' function in that file, though this is rather delicate. It'd be nice to have it resolved 🙂
pattobrien
Metadata
Metadata
Assignees
Labels
consoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocol