2015-08-27 04:25:28 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_BROWSER_NODE_DEBUGGER_H_
|
|
|
|
#define ATOM_BROWSER_NODE_DEBUGGER_H_
|
|
|
|
|
2016-07-04 06:08:55 +00:00
|
|
|
#include <memory>
|
2015-08-27 04:25:28 +00:00
|
|
|
|
2017-06-12 18:53:11 +00:00
|
|
|
#include "base/macros.h"
|
|
|
|
|
|
|
|
namespace node {
|
|
|
|
class Environment;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
class Platform;
|
|
|
|
}
|
2015-08-27 04:25:28 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2017-05-15 16:30:55 +00:00
|
|
|
// Add support for node's "--inspect" switch.
|
|
|
|
class NodeDebugger {
|
2015-08-27 04:25:28 +00:00
|
|
|
public:
|
2017-05-15 16:30:55 +00:00
|
|
|
explicit NodeDebugger(node::Environment* env);
|
|
|
|
~NodeDebugger();
|
2015-08-27 04:25:28 +00:00
|
|
|
|
2017-05-15 16:30:55 +00:00
|
|
|
void Start();
|
2015-08-27 04:25:28 +00:00
|
|
|
|
|
|
|
private:
|
2017-05-15 16:30:55 +00:00
|
|
|
node::Environment* env_;
|
|
|
|
std::unique_ptr<v8::Platform> platform_;
|
2015-08-27 04:25:28 +00:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(NodeDebugger);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_NODE_DEBUGGER_H_
|