Qore DebugUtil Module Reference 0.1.1
Loading...
Searching...
No Matches
DebugUtil.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* DebugUtil.qm Copyright 2013 - 2022 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
29
47namespace DebugUtil {
49
71class WrapperGetOpt : public GetOpt {
72
73public:
74 constructor(hash options);
75
76
78
110 split(list<string> args, reference<list<string>> wrp_args, reference<*string> pgm_name, reference<list<string>> pgm_args);
111 };
112
114 const QoreDebugWsProtocolHeader = "QoreDebugWsProtocol";
115
118
120 const DUV_NONE = LoggerLevel::OFF;
122 const DUV_INFO = LoggerLevel::INFO;
124 const DUV_DEBUG = LoggerLevel::DEBUG;
126 const DUV_DEBUG_1 = LoggerLevel::TRACE;
127
130
131public:
132 int verbose = DUV_NONE;
133 constructor() {}
134
136
140 log(int verbosity, string fmt);
141
143
148 log2(int verbosity, string fmt, *list args);
149 };
150
153
154public:
155 DebugLogger logger;
157 bool showFullException = False;
158
159 const runStateStrings = ('detach': DebugDetach, 'run': DebugRun, 'step': DebugStep, 'stepover': DebugStepOver, 'untilreturn': DebugUntilReturn);
160 const flowStrings = ('none': 0, 'return': DebugFlowReturn, 'break': DebugFlowBreak, 'continue': DebugFlowContinue);
161 const boolStrings = ('false': False, 'true': True);
162 const policyStrings = ('none': BreakpointPolicyNone, 'accept': BreakpointPolicyAccept, 'reject': BreakpointPolicyReject);
163
164 log(int verbosity, string fmt);
165
166 static list enumFilter(softlist items, *string path);
167
168 static bool evalCondition(softstring value, *string cond);
169
170 // make_json/yaml does not support object code etc. so we need somehow process values
171 static hash serialize(auto val);
172
173 static auto unserialize(auto sv);
174
175 };
176
177};
base class for controlling debugging
Definition: DebugUtil.qm.dox.h:152
bool showFullException
for debugging of debug library to see where exception is raised
Definition: DebugUtil.qm.dox.h:157
class that can be used for logging
Definition: DebugUtil.qm.dox.h:129
log(int verbosity, string fmt)
implement logging
log2(int verbosity, string fmt, *list args)
implement logging
class supporting argument parsing for executing programs to debug
Definition: DebugUtil.qm.dox.h:71
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.
the DebugUtil namespace contains all the definitions in the DebugUtil module
Definition: DebugUtil.qm.dox.h:47
const DUV_INFO
logging constant: info messages
Definition: DebugUtil.qm.dox.h:122
const QoreDebugProtocolVersion
The debug protocol version implemented.
Definition: DebugUtil.qm.dox.h:117
const DUV_NONE
logging constant: no logging
Definition: DebugUtil.qm.dox.h:120
const QoreDebugWsProtocolHeader
The HTTP header string for the Qore debug protocol version.
Definition: DebugUtil.qm.dox.h:114
const DUV_DEBUG_1
logging constant: detailed debug messages
Definition: DebugUtil.qm.dox.h:126
const DUV_DEBUG
logging constant: debug messages
Definition: DebugUtil.qm.dox.h:124