app: add support for inspect/inspect-brk in forked node process
This commit is contained in:
parent
a6ea316a5d
commit
538b97582a
3 changed files with 16 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "atom/app/uv_task_runner.h"
|
||||
#include "atom/browser/javascript_environment.h"
|
||||
#include "atom/browser/node_debugger.h"
|
||||
#include "atom/common/api/atom_bindings.h"
|
||||
#include "atom/common/crash_reporter/crash_reporter.h"
|
||||
#include "atom/common/native_mate_converters/string16_converter.h"
|
||||
|
@ -50,6 +51,10 @@ int NodeMain(int argc, char *argv[]) {
|
|||
&isolate_data, gin_env.context(), argc, argv,
|
||||
exec_argc, exec_argv);
|
||||
|
||||
// Enable support for v8 inspector.
|
||||
NodeDebugger node_debugger(env);
|
||||
node_debugger.Start();
|
||||
|
||||
mate::Dictionary process(gin_env.isolate(), env->process_object());
|
||||
#if defined(OS_WIN)
|
||||
process.SetMethod("log", &AtomBindings::Log);
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include "libplatform/libplatform.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
|
||||
#include "atom/common/node_includes.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
NodeDebugger::NodeDebugger(node::Environment* env) : env_(env) {
|
||||
|
|
|
@ -7,7 +7,15 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "atom/common/node_includes.h"
|
||||
#include "base/macros.h"
|
||||
|
||||
namespace node {
|
||||
class Environment;
|
||||
}
|
||||
|
||||
namespace v8 {
|
||||
class Platform;
|
||||
}
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue