Repository navigation
Document no-op console methods #16755
Description
Activity
- addedconsoleIssues and PRs related to the console subsystem.Issues and PRs related to the console subsystem.docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.
on Nov 4, 2017 relevant #12675
- addedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on Nov 4, 2017 Hi there! I'd like to pick this one up as my first contrib to core.
Already forked and built+tested the repo.Any more information you can give me on this one, just in case?
From what I see, based on #12675 and on
lib/console.js, these functions are all non-op:console.debug console.dirxml console.markTimeline console.profile console.profileEnd console.table console.timeStamp console.timeline console.timelineEnd
Can someone confirm/infirm?
Reacted by Chris Gibb and Renan BastosThese are NOT actually no-ops!
All of the new-to-node
consolemethods (that @Tiriel listed above) are real implementations for the Inspector. ie, they may appear to be no-ops unless you're running node with the--inspectoption and then openchrome://inspectin Chrome and attach to your process. In the inspector's console, you'll see the results of using these methods (egconsole.debug,console.profile, etc...); but you will not see anything on stdout.There is no indication of these methods' existence in lib/console.js because they are not implemented in node. The methods were added by V8 starting with node v8.0 and are copied to node's
consoleglobal.
Also, depending on how #15579 shakes out, this may be moot since that PR may end up removing these undocumented
consolemethods.Reacted by Benjamin ZaslavskyThanks for the input @daguej !
I'll check what comes out of this PR and see if this issue needs closing then.If not, what about adding a new section 'Inspector only methods' explaining the deal and listing these methods?
Okay, trying to wrap my head around a first draft just in case.
As a first timer would-be committer, is there anything I should know? Are there some things automatically generated? Am I to write directly yhe markdown in the doc folder or is it somewhere else? In short, if someone as any kind of advice/how-to to provide me, that would be great.
@Tiriel There are nothing in doc/ that is automatically generated; directly editing the markdown files is enough.
Reacted by Benjamin ZaslavskyReacted by Benjamin Zaslavsky@TimothyGu Awesome, thanks!
41 remaining items
- added 2 commits that reference this issue
on Dec 12, 2017 - added a commit that references this issue
on Dec 10, 2018 - added a commit that references this issue
on Jul 27, 2026
I just noticed starting from Node@8,
console.debug()is defined but it is a no-op.This causes my library to not behaving correctly.
It would be better to at least mention in the documentation that they are there but are no-op.
Are any of these has the same problem?
#1716 (comment)