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

Function initializeContext

lib/internal/debugger/inspect_repl.js:967–1200  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

965 }
966
967 function initializeContext(context) {
968 ArrayPrototypeForEach(inspector.domainNames, (domain) => {
969 ObjectDefineProperty(context, domain, {
970 __proto__: null,
971 value: inspector[domain],
972 enumerable: true,
973 configurable: true,
974 writeable: false,
975 });
976 });
977
978 copyOwnProperties(context, {
979 get help() {
980 return print(HELP);
981 },
982
983 get run() {
984 return runAndInit();
985 },
986
987 get kill() {
988 return inspector.killChild();
989 },
990
991 get restart() {
992 return runAndInit();
993 },
994
995 get cont() {
996 handleResumed();
997 return Debugger.resume();
998 },
999
1000 get next() {
1001 handleResumed();
1002 return Debugger.stepOver();
1003 },
1004
1005 get step() {
1006 handleResumed();
1007 return Debugger.stepInto();
1008 },
1009
1010 get out() {
1011 handleResumed();
1012 return Debugger.stepOut();
1013 },
1014
1015 get pause() {
1016 return Debugger.pause();
1017 },
1018
1019 get backtrace() {
1020 return currentBacktrace;
1021 },
1022
1023 get breakpoints() {
1024 return listBreakpoints();

Callers 1

createReplFunction · 0.85

Calls 2

aliasPropertiesFunction · 0.85
copyOwnPropertiesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…