Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
node_debug_options.h
Go to the documentation of this file.
1 #ifndef SRC_NODE_DEBUG_OPTIONS_H_
2 #define SRC_NODE_DEBUG_OPTIONS_H_
3 
4 #include <string>
5 
6 // Forward declaration to break recursive dependency chain with src/env.h.
7 namespace node {
8 
9 class DebugOptions {
10  public:
11  DebugOptions();
12  bool ParseOption(const char* argv0, const std::string& option);
13  bool inspector_enabled() const { return inspector_enabled_; }
14  bool deprecated_invocation() const {
15  return deprecated_debug_ &&
16  inspector_enabled_ &&
17  break_first_line_;
18  }
19  bool invalid_invocation() const {
20  return deprecated_debug_ && !inspector_enabled_;
21  }
22  bool wait_for_connect() const { return break_first_line_; }
23  std::string host_name() const { return host_name_; }
24  void set_host_name(std::string host_name) { host_name_ = host_name; }
25  int port() const;
26  void set_port(int port) { port_ = port; }
27 
28  private:
29  bool inspector_enabled_;
30  bool deprecated_debug_;
31  bool break_first_line_;
32  std::string host_name_;
33  int port_;
34 };
35 
36 } // namespace node
37 
38 #endif // SRC_NODE_DEBUG_OPTIONS_H_
bool ParseOption(const char *argv0, const std::string &option)
bool inspector_enabled() const
void set_host_name(std::string host_name)
bool invalid_invocation() const
void set_port(int port)
bool wait_for_connect() const
bool deprecated_invocation() const
std::string host_name() const