Qore DebugUtil Module Reference  0.1
DebugUtil.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* DebugUtil.qm Copyright 2013 - 2017 Qore Technologies, s.r.o.
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // minimum required Qore version
26 
27 
28 
41 namespace DebugUtil {
44 
66 class WrapperGetOpt : public GetOpt {
67 
68 public:
69  constructor(hash options);
70 
71 
73 
105  split(list<string> args, reference<list<string>> wrp_args, reference<*string> pgm_name, reference<list<string>> pgm_args);
106  };
107 
109  const QoreDebugWsProtocolHeader = "QoreDebugWsProtocol";
110 
113 
115  const DUV_NONE = 0;
117  const DUV_INFO = 1;
119  const DUV_DEBUG = 2;
121  const DUV_DEBUG_1 = 3;
122 
124  class DebugLogger {
125 
126 public:
127  public :
128  int verbose = DUV_NONE;
129 
130 public:
131  constructor() {}
132 
134 
137  log(int verbosity, string fmt);
138  };
139 
142 
143 public:
144  public :
145  DebugLogger logger;
147  bool showFullException = False;
148 
149  const runStateStrings = ('detach': DebugDetach, 'run': DebugRun, 'step': DebugStep, 'stepover': DebugStepOver, 'untilreturn': DebugUntilReturn);
150  const flowStrings = ('none': 0, 'return': DebugFlowReturn, 'break': DebugFlowBreak, 'continue': DebugFlowContinue);
151  const boolStrings = ('false': False, 'true': True);
152  const policyStrings = ('none': BreakpointPolicyNone, 'accept': BreakpointPolicyAccept, 'reject': BreakpointPolicyReject);
153 
154 public:
155 
156  static list enumFilter(softlist items, *string path);
157 
158  static bool evalCondition(softstring value, *string cond);
159 
160  // make_json/yaml does not support object code etc. so we need somehow process values
161  static hash serialize(auto val);
162 
163  static auto unserialize(auto sv);
164 
165  };
166 
167 };
const DebugDetach
const QoreDebugWsProtocolHeader
The HTTP header string for the Qore debug protocol version.
Definition: DebugUtil.qm.dox.h:109
class supporting argument parsing for executing programs to debug
Definition: DebugUtil.qm.dox.h:66
const DebugFlowBreak
const BreakpointPolicyNone
const BreakpointPolicyReject
const DebugFlowContinue
base class for controlling debugging
Definition: DebugUtil.qm.dox.h:141
const True
const QoreDebugProtocolVersion
The debug protocol version implemented.
Definition: DebugUtil.qm.dox.h:112
const False
const DebugFlowReturn
const DUV_INFO
logging constant: info messages
Definition: DebugUtil.qm.dox.h:117
list list(...)
const DebugRun
const DUV_NONE
logging constant: no logging
Definition: DebugUtil.qm.dox.h:115
const BreakpointPolicyAccept
const DebugStepOver
const DUV_DEBUG_1
logging constant: detailed debug messages
Definition: DebugUtil.qm.dox.h:121
const DebugUntilReturn
const DebugStep
class that can be used for logging
Definition: DebugUtil.qm.dox.h:124
hash hash(object obj)
the DebugUtil namespace contains all the definitions in the DebugUtil module
Definition: DebugUtil.qm.dox.h:42
split(list< string > args, reference< list< string >> wrp_args, reference< *string > pgm_name, reference< list< string >> pgm_args)
Parses input arguments until a standalone argument is found.
const DUV_DEBUG
logging constant: debug messages
Definition: DebugUtil.qm.dox.h:119