Open connor4312 opened 4 years ago
Can i work on this issue?
@Pratik-ahirrao There’s nobody actively working on this, as far as I know.
This is my contribution. Can you help me to get start with this issue?
@Pratik-ahirrao I don’t really know where to start here, tbh. It’s probably not hard to fix but I don’t know what the actual underlying cause is here, otherwise I would have looked into this when it was opened.
Following up since I'm refactoring and improving this area in the debugger: this seems to happen for several methods, including group
, assert
, and count
. E.g. and output event for count is given normally as
{
type: "log",
args: [
{
type: "string",
value: "asdf: 1",
},
],
executionContextId: 1,
timestamp: 1597354790760.242,
stackTrace: {
callFrames: [
{
functionName: "count",
scriptId: "25",
url: "internal/console/constructor.js",
lineNumber: 369,
columnNumber: 9,
},
then shortly followed up
{
type: "log",
args: [
{
type: "string",
value: "asdf: 1",
},
],
executionContextId: 1,
timestamp: 1597354790760.242,
stackTrace: {
callFrames: [
{
functionName: "count",
scriptId: "25",
url: "internal/console/constructor.js",
lineNumber: 369,
columnNumber: 9,
},
{
functionName: "",
scriptId: "119",
url: "file:///c:/Users/Connor/Documents/Github/vscode-js-debug/demos/node/main.js",
lineNumber: 1,
columnNumber: 10,
},
In the debugger I have create a denylist of methods in internal/console/constructor.js
from which we ignore events.
What steps will reproduce the bug?
With a debugger attached, invoke:
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 thegroup
method ininternal/console/constructor.js
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 🙂
Ref: https://github.com/microsoft/vscode/issues/91095