Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: remove _debugger.js #12495

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,791 changes: 0 additions & 1,791 deletions lib/_debugger.js

This file was deleted.

33 changes: 2 additions & 31 deletions lib/internal/bootstrap_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@

const internalModule = NativeModule.require('internal/module');
internalModule.addBuiltinLibsToObject(global);
run(() => {
evalScript('[eval]');
});
evalScript('[eval]');
} else if (process.argv[1]) {
// make process.argv[1] into a full path
const path = NativeModule.require('path');
Expand All @@ -143,7 +141,7 @@
}

preloadModules();
run(Module.runMain);
Module.runMain();
} else {
preloadModules();
// If -i or --interactive were passed, or stdin is a TTY.
Expand Down Expand Up @@ -417,33 +415,6 @@
}
}

function isDebugBreak() {
return process.execArgv.some((arg) => /^--debug-brk(=[0-9]+)?$/.test(arg));
}

function run(entryFunction) {
if (process._debugWaitConnect && isDebugBreak()) {

// XXX Fix this terrible hack!
//
// Give the client program a few ticks to connect.
// Otherwise, there's a race condition where `node debug foo.js`
// will not be able to connect in time to catch the first
// breakpoint message on line 1.
//
// A better fix would be to somehow get a message from the
// V8 debug object about a connection, and runMain when
// that occurs. --isaacs

const debugTimeout = +process.env.NODE_DEBUG_TIMEOUT || 50;
setTimeout(entryFunction, debugTimeout);

} else {
// Main entry point into most programs:
entryFunction();
}
}

function checkScriptSyntax(source, filename) {
const Module = NativeModule.require('module');
const vm = NativeModule.require('vm');
Expand Down
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ Module.prototype.require = function(path) {


// Resolved path to process.argv[1] will be lazily placed here
// (needed for setting breakpoint when called with --debug-brk)
// (needed for setting breakpoint when called with --inspect-brk)
var resolvedArgv;


Expand Down
1 change: 0 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
'library_files': [
'lib/internal/bootstrap_node.js',
'lib/_debug_agent.js',
'lib/_debugger.js',
'lib/assert.js',
'lib/buffer.js',
'lib/child_process.js',
Expand Down
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3337,7 +3337,7 @@ void SetupProcessObject(Environment* env,
READONLY_PROPERTY(process, "traceDeprecation", True(env->isolate()));
}

// --debug-brk
// --inspect-brk
if (debug_options.wait_for_connect()) {
READONLY_PROPERTY(process, "_debugWaitConnect", True(env->isolate()));
}
Expand Down
134 changes: 0 additions & 134 deletions test/debugger/test-debug-break-on-uncaught.js

This file was deleted.

Loading