MCPcopy Index your code
hub / github.com/nodejs/node / debug

Function debug

lib/internal/util/debuglog.js:92–113  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

90 enabled = testEnabled(set);
91 }
92 let debug = (...args) => {
93 init();
94 // Only invokes debuglogImpl() when the debug function is
95 // called for the first time.
96 debug = debuglogImpl(enabled, set);
97 if (typeof cb === 'function') {
98 ObjectDefineProperty(debug, 'enabled', {
99 __proto__: null,
100 get() {
101 return enabled;
102 },
103 configurable: true,
104 enumerable: true,
105 });
106 cb(debug);
107 }
108 switch (args.length) {
109 case 1: return debug(args[0]);
110 case 2: return debug(args[0], args[1]);
111 default: return debug(...new SafeArrayIterator(args));
112 }
113 };
114 let enabled;
115 let test = () => {
116 init();

Callers 15

loggerFunction · 0.70
rewriteForProxiedHttpFunction · 0.50
ClientRequestFunction · 0.50
socketCloseListenerFunction · 0.50
socketErrorListenerFunction · 0.50
socketOnDataFunction · 0.50
parserOnIncomingClientFunction · 0.50
responseKeepAliveFunction · 0.50
responseOnEndFunction · 0.50
connectFunction · 0.50
closeSocketHandleFunction · 0.50
net.jsFile · 0.50

Calls 3

debuglogImplFunction · 0.85
initFunction · 0.70
cbFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…