aboutsummaryrefslogtreecommitdiff
path: root/src/js/node/inspector.ts
blob: 1fd7316f749362225ced3298b32d4ee0652bd70d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Hardcoded module "node:inspector" and "node:inspector/promises"
// This is a stub! None of this is actually implemented yet.
const { hideFromStack, throwNotImplemented } = require("$shared");
const EventEmitter = require("node:events");

function open() {
  throwNotImplemented("node:inspector open", 2445);
}

function close() {
  throwNotImplemented("node:inspector close", 2445);
}

function url() {
  throwNotImplemented("node:inspector url", 2445);
}

function waitForDebugger() {
  throwNotImplemented("node:inspector waitForDebugger", 2445);
}

class Session extends EventEmitter {
  constructor() {
    super();
    throwNotImplemented("node:inspector Session", 2445);
  }
}

const console = {
  ...globalThis.console,
  context: {
    console: globalThis.console,
  },
};

export default {
  console,
  open,
  close,
  url,
  waitForDebugger,
  Session,
};

hideFromStack(open, close, url, waitForDebugger, Session.prototype.constructor);