30 #include <boost/lexical_cast.hpp>
33 #define DBG_FDB LOG_STREAM(debug, log_formula_debugger)
34 #define LOG_FDB LOG_STREAM(info, log_formula_debugger)
35 #define WRN_FDB LOG_STREAM(warn, log_formula_debugger)
36 #define ERR_FDB LOG_STREAM(err, log_formula_debugger)
42 : arg_number_(arg_number), counter_(counter), level_(level), name_(name),
str_(str), value_(value), evaluated_(evaluated)
100 : call_stack_(), counter_(0), current_breakpoint_(), breakpoints_(), execution_trace_(),arg_number_extra_debug_info(-1), f_name_extra_debug_info(
"")
144 if ((*b)->is_break_now()){
148 if ((*b)->is_one_time_only()) {
159 WRN_FDB <<
"do not showing debug window due to nullptr gui" << std::endl;
166 WRN_FDB <<
"do not showing debug window due to disabled --new-widgets"<< std::endl;
204 msg(
" evaluated expression: ",
call_stack_.back(),
" to ",v.to_debug_string(
nullptr,
true).c_str());
219 msg(
" evaluated formula: ",
call_stack_.back(),
" to ",v.to_debug_string(
nullptr,
true).c_str());
230 msg(
" evaluating formula without variables: ",
call_stack_.back());
234 msg(
" evaluated formula without variables: ",
call_stack_.back(),
" to ",v.to_debug_string(
nullptr,
true).c_str());
242 : fdb_(fdb), name_(name), one_time_only_(one_time_only)
278 if ((call_stack.size() == 1) && (call_stack[0].evaluated()) ) {
300 if (call_stack.empty() || call_stack.back().evaluated()) {
323 if (call_stack.empty() || call_stack.back().evaluated()) {
327 if (call_stack.size() ==
level_) {
351 if (call_stack.empty() || call_stack.back().evaluated()) {
354 if (call_stack.size() ==
level_) {
367 LOG_FDB <<
"added 'end' breakpoint"<< std::endl;
374 LOG_FDB <<
"added 'step into' breakpoint"<< std::endl;
381 LOG_FDB <<
"added 'step out' breakpoint"<< std::endl;
388 LOG_FDB <<
"added 'next' breakpoint"<< std::endl;
const std::string & str() const
void set_evaluated(bool evaluated)
virtual ~base_breakpoint()
virtual bool is_break_now() const
step_in_breakpoint(formula_debugger &fdb)
virtual bool is_break_now() const
bool show(CVideo &video, const unsigned auto_close_time=0)
Shows the window.
const std::string & name() const
virtual ~step_in_breakpoint()
step_out_breakpoint(formula_debugger &fdb)
std::string get_call_stack()
GLdouble GLdouble GLdouble b
GLsizei const GLfloat * value
const std::string & name() const
void set_value(const variant &value)
static lg::log_domain log_formula_debugger("scripting/formula/debug")
const variant & value() const
base_breakpoint(formula_debugger &fdb, const std::string &name, bool one_time_only)
debug_info(int arg_number, int counter, int level, const std::string &name, const std::string &str, const variant &value, bool evaluated)
virtual bool is_break_now() const
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
virtual ~next_breakpoint()
end_breakpoint(formula_debugger &fdb)
GLuint const GLchar * name
virtual bool is_break_now() const
virtual ~step_out_breakpoint()
Standard logging facilities (interface).
virtual ~end_breakpoint()
GLsizei const GLcharARB ** string
bool is_one_time_only() const
boost::shared_ptr< base_breakpoint > breakpoint_ptr
next_breakpoint(formula_debugger &fdb)