The ZX Ecosystem
v5.1.0;_GUI_v3.1.0
Loading...
Searching...
No Matches
include
zxecosystem
ancillary
Debugging.h
Go to the documentation of this file.
1
2
/* *************************************************************************/
50
#ifndef DEBUGGINGCPP
51
#define DEBUGGINGCPP
52
53
54
/* ****************************************************************************
55
56
MACROS
57
58
******************************************************************************/
59
80
#ifdef DEBUG
81
82
#include <iostream>
83
85
// We use here "_" as a preffix of inner variables in order not to collide
86
// with external ones that may be used in the macro arguments.
87
#define DEBUGBASE(txt,id) std::string _p;\
88
DEBUGPREFFIX(_p);\
89
std::cout << "["
<< id << "] " << _p << ": " \
90
<< txt << std::endl
91
92
#if DEBUG==2
93
#define DEBUGLOG(txt) { DEBUGBASE(txt,"+d+"
);\
94
int _opc; \
95
std::cout << "(enter an integer to cont.)"\
96
<< std::endl;\
97
std::cin >> _opc; }
98
#else
99
#define DEBUGLOG(txt) { DEBUGBASE(txt,"-d-"
); }
100
#endif
101
102
#define TRACELOG(txt) { DEBUGBASE(txt,"*t*"
); }
103
104
#else
105
106
#define DEBUGLOG(txt)
107
108
#define TRACELOG(txt)
109
110
#endif
111
// Debug macros
113
114
#endif
115
// Debugging
117
Generated on Sat Feb 1 2025 16:50:46 for The ZX Ecosystem by
1.9.5