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

Function enable

lib/internal/inspector_async_hook.js:36–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36function enable() {
37 if (hook === undefined) lazyHookCreation();
38 if (config.bits < 64) {
39 // V8 Inspector stores task ids as (void*) pointers.
40 // async_hooks store ids as 64bit numbers.
41 // As a result, we cannot reliably translate async_hook ids to V8 async_task
42 // ids on 32bit platforms.
43 process.emitWarning(
44 'Warning: Async stack traces in debugger are not available ' +
45 `on ${config.bits}bit platforms. The feature is disabled.`,
46 {
47 code: 'INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE',
48 });
49 } else {
50 hook.enable();
51 }
52}
53
54function disable() {
55 if (hook === undefined) lazyHookCreation();

Callers

nothing calls this directly

Calls 2

lazyHookCreationFunction · 0.85
enableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…