Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c	(revision 439)
@@ -85,5 +85,5 @@
 
 static uint16_t
-check_file_lineno(struct mrb_irep *irep, const char *file, uint16_t lineno)
+check_file_lineno(mrb_state *mrb, struct mrb_irep *irep, const char *file, uint16_t lineno)
 {
   mrb_irep_debug_info_file *info_file;
@@ -94,6 +94,8 @@
 
   for (f_idx = 0; f_idx < irep->debug_info->flen; ++f_idx) {
+    const char *filename;
     info_file = irep->debug_info->files[f_idx];
-    if (!strcmp(info_file->filename, file)) {
+    filename = mrb_sym_name_len(mrb, info_file->filename_sym, NULL);
+    if (!strcmp(filename, file)) {
       result = MRB_DEBUG_BP_FILE_OK;
 
@@ -104,5 +106,5 @@
     }
     for (i=0; i < irep->rlen; ++i) {
-      result  |= check_file_lineno(irep->reps[i], file, lineno);
+      result  |= check_file_lineno(mrb, irep->reps[i], file, lineno);
       if (result == (MRB_DEBUG_BP_FILE_OK | MRB_DEBUG_BP_LINENO_OK)) {
         return result;
@@ -113,15 +115,4 @@
 }
 
-static const char*
-get_class_name(mrb_state *mrb, struct RClass *class_obj)
-{
-  struct RClass *outer;
-  mrb_sym class_sym;
-
-  outer = mrb_class_outer_module(mrb, class_obj);
-  class_sym = mrb_class_sym(mrb, class_obj, outer);
-  return mrb_sym2name(mrb, class_sym);
-}
-
 static int32_t
 compare_break_method(mrb_state *mrb, mrb_debug_breakpoint *bp, struct RClass *class_obj, mrb_sym method_sym, mrb_bool* isCfunc)
@@ -129,5 +120,5 @@
   const char* class_name;
   const char* method_name;
-  struct RProc* m;
+  mrb_method_t m;
   struct RClass* sc;
   const char* sn;
@@ -136,9 +127,9 @@
   mrb_bool is_defined;
 
-  method_name = mrb_sym2name(mrb, method_sym);
+  method_name = mrb_sym_name(mrb, method_sym);
 
   method_p = &bp->point.methodpoint;
   if (strcmp(method_p->method_name, method_name) == 0) {
-    class_name = get_class_name(mrb, class_obj);
+    class_name = mrb_class_name(mrb, class_obj);
     if (class_name == NULL) {
       if (method_p->class_name == NULL) {
@@ -148,8 +139,8 @@
     else if (method_p->class_name != NULL) {
       m = mrb_method_search_vm(mrb, &class_obj, method_sym);
-      if (m == NULL) {
+      if (MRB_METHOD_UNDEF_P(m)) {
         return MRB_DEBUG_OK;
       }
-      if (MRB_PROC_CFUNC_P(m)) {
+      if (MRB_METHOD_CFUNC_P(m)) {
         *isCfunc = TRUE;
       }
@@ -163,10 +154,10 @@
       ssym = mrb_symbol(mrb_check_intern_cstr(mrb, method_p->method_name));
       m = mrb_method_search_vm(mrb, &sc, ssym);
-      if (m == NULL) {
+      if (MRB_METHOD_UNDEF_P(m)) {
         return MRB_DEBUG_OK;
       }
 
-      class_name = get_class_name(mrb, class_obj);
-      sn = get_class_name(mrb, sc);
+      class_name = mrb_class_name(mrb, class_obj);
+      sn = mrb_class_name(mrb, sc);
       if (strcmp(sn, class_name) == 0) {
         return bp->bpno;
@@ -197,5 +188,5 @@
 
   /* file and lineno check (line type mrb_debug_line_ary only.) */
-  result = check_file_lineno(dbg->root_irep, file, lineno);
+  result = check_file_lineno(mrb, dbg->root_irep, file, lineno);
   if (result == 0) {
     return MRB_DEBUG_BREAK_INVALID_FILE;
@@ -205,5 +196,5 @@
   }
 
-  set_file = mrb_malloc(mrb, strlen(file) + 1);
+  set_file = (char*)mrb_malloc(mrb, strlen(file) + 1);
 
   index = dbg->bpnum;
@@ -242,5 +233,5 @@
 
   if (class_name != NULL) {
-    set_class = mrb_malloc(mrb, strlen(class_name) + 1);
+    set_class = (char*)mrb_malloc(mrb, strlen(class_name) + 1);
     strncpy(set_class, class_name, strlen(class_name) + 1);
   }
@@ -249,5 +240,5 @@
   }
 
-  set_method = mrb_malloc(mrb, strlen(method_name) + 1);
+  set_method = (char*)mrb_malloc(mrb, strlen(method_name) + 1);
 
   strncpy(set_method, method_name, strlen(method_name) + 1);
@@ -438,8 +429,8 @@
 
 static mrb_bool
-check_start_pc_for_line(mrb_irep *irep, mrb_code *pc, uint16_t line)
+check_start_pc_for_line(mrb_state *mrb, mrb_irep *irep, const mrb_code *pc, uint16_t line)
 {
   if (pc > irep->iseq) {
-    if (line == mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq - 1))) {
+    if (line == mrb_debug_get_line(mrb, irep, pc - irep->iseq - 1)) {
       return FALSE;
     }
@@ -459,5 +450,5 @@
   }
 
-  if (!check_start_pc_for_line(dbg->irep, dbg->pc, line)) {
+  if (!check_start_pc_for_line(mrb, dbg->irep, dbg->pc, line)) {
     return MRB_DEBUG_OK;
   }
@@ -515,4 +506,2 @@
   return 0;
 }
-
-
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c	(revision 439)
@@ -49,5 +49,5 @@
   }
 
-  path = mrb_malloc(mrb, len);
+  path = (char*)mrb_malloc(mrb, len);
   memset(path, 0, len);
 
@@ -65,5 +65,6 @@
 {
   size_t len;
-  char *p, *dir;
+  const char *p;
+  char *dir;
 
   if (path == NULL) {
@@ -74,5 +75,5 @@
   len = p != NULL ? (size_t)(p - path) : strlen(path);
 
-  dir = mrb_malloc(mrb, len + 1);
+  dir = (char*)mrb_malloc(mrb, len + 1);
   strncpy(dir, path, len);
   dir[len] = '\0';
@@ -84,7 +85,7 @@
 source_file_new(mrb_state *mrb, mrb_debug_context *dbg, char *filename)
 {
-  source_file *file = NULL;
-
-  file = mrb_malloc(mrb, sizeof(source_file));
+  source_file *file;
+
+  file = (source_file*)mrb_malloc(mrb, sizeof(source_file));
 
   memset(file, '\0', sizeof(source_file));
@@ -97,5 +98,5 @@
 
   file->lineno = 1;
-  file->path = mrb_malloc(mrb, strlen(filename) + 1);
+  file->path = (char*)mrb_malloc(mrb, strlen(filename) + 1);
   strcpy(file->path, filename);
   return file;
@@ -175,7 +176,11 @@
   const char *search_path[3];
   char *path = NULL;
+  const char *srcname = strrchr(filename, '/');
+
+  if (srcname) srcname++;
+  else srcname = filename;
 
   search_path[0] = srcpath;
-  search_path[1] = dirname(mrb, mrb_debug_get_filename(mrdb->dbg->root_irep, 0));
+  search_path[1] = dirname(mrb, mrb_debug_get_filename(mrb, mrdb->dbg->irep, 0));
   search_path[2] = ".";
 
@@ -185,5 +190,5 @@
     }
 
-    if ((path = build_path(mrb, search_path[i], filename)) == NULL) {
+    if ((path = build_path(mrb, search_path[i], srcname)) == NULL) {
       continue;
     }
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c	(revision 439)
@@ -22,5 +22,5 @@
   c->no_exec = TRUE;
   c->capture_errors = TRUE;
-  c->filename = (char*)dbg->prvfile;
+  mrbc_filename(mrb, c, (const char*)dbg->prvfile);
   c->lineno = dbg->prvline;
 
@@ -32,7 +32,7 @@
 
 mrb_value
-mrb_debug_eval(mrb_state *mrb, mrb_debug_context *dbg, const char *expr, size_t len, mrb_bool *exc)
+mrb_debug_eval(mrb_state *mrb, mrb_debug_context *dbg, const char *expr, size_t len, mrb_bool *exc, int direct_eval)
 {
-  void (*tmp)(struct mrb_state *, struct mrb_irep *, mrb_code *, mrb_value *);
+  void (*tmp)(struct mrb_state *, struct mrb_irep *, const mrb_code *, mrb_value *);
   mrb_value ruby_code;
   mrb_value s;
@@ -48,4 +48,9 @@
     v = mrb_obj_value(mrb->exc);
     mrb->exc = 0;
+  }
+  else if (direct_eval) {
+    recv = dbg->regs[0];
+
+    v = mrb_funcall(mrb, recv, expr, 0);
   }
   else {
@@ -70,5 +75,5 @@
   }
 
-  s = mrb_funcall(mrb, v, "inspect", 0);
+  s = mrb_inspect(mrb, v);
 
   /* enable code_fetch_hook */
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h	(revision 439)
@@ -9,5 +9,5 @@
 #include "mrdb.h"
 
-mrb_value mrb_debug_eval(mrb_state*, mrb_debug_context*, const char*, size_t, mrb_bool*);
+mrb_value mrb_debug_eval(mrb_state*, mrb_debug_context*, const char*, size_t, mrb_bool*, int);
 
 #endif /* APIPRINT_H_ */
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c	(revision 439)
@@ -243,5 +243,5 @@
 
 mrb_debug_bptype
-parse_breakcommand(mrdb_state *mrdb, const char **file, uint32_t *line, char **cname, char **method)
+parse_breakcommand(mrb_state *mrb, mrdb_state *mrdb, const char **file, uint32_t *line, char **cname, char **method)
 {
   mrb_debug_context *dbg = mrdb->dbg;
@@ -275,5 +275,5 @@
       if (l <= 65535) {
         *line = l;
-        *file = (body == args)? mrb_debug_get_filename(dbg->irep, (uint32_t)(dbg->pc - dbg->irep->iseq)): args;
+        *file = (body == args)? mrb_debug_get_filename(mrb, dbg->irep, dbg->pc - dbg->irep->iseq): args;
       }
       else {
@@ -333,5 +333,5 @@
   int32_t ret;
 
-  type = parse_breakcommand(mrdb, &file, &line, &cname, &method);
+  type = parse_breakcommand(mrb, mrdb, &file, &line, &cname, &method);
   switch (type) {
     case MRB_DEBUG_BPTYPE_LINE:
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c	(revision 439)
@@ -81,4 +81,10 @@
     "Status of specified breakpoints (all user-settable breakpoints if no argument).\n"
     "Arguments are breakpoint numbers with spaces in between.\n"
+  },
+  {
+    "i[nfo]", "l[ocals]", "Print name of local variables",
+    "Usage: info locals\n"
+    "\n"
+    "Print name of local variables.\n"
   },
   {
@@ -134,5 +140,5 @@
 listcmd_parser_state_new(mrb_state *mrb)
 {
-  listcmd_parser_state *st = mrb_malloc(mrb, sizeof(listcmd_parser_state));
+  listcmd_parser_state *st = (listcmd_parser_state*)mrb_malloc(mrb, sizeof(listcmd_parser_state));
   memset(st, 0, sizeof(listcmd_parser_state));
   return st;
@@ -228,5 +234,5 @@
 
   if (len > 0) {
-    st->filename = mrb_malloc(mrb, len + 1);
+    st->filename = (char*)mrb_malloc(mrb, len + 1);
     strncpy(st->filename, *sp, len);
     st->filename[len] = '\0';
@@ -243,5 +249,6 @@
 {
   size_t len;
-  char *p, *s;
+  const char *p;
+  char *s;
 
   if (filename == NULL) {
@@ -256,5 +263,5 @@
   }
 
-  s = mrb_malloc(mrb, len + strlen(ext) + 1);
+  s = (char*)mrb_malloc(mrb, len + strlen(ext) + 1);
   memset(s, '\0', len + strlen(ext) + 1);
   strncpy(s, filename, len);
@@ -326,5 +333,5 @@
 check_cmd_pattern(const char *pattern, const char *cmd)
 {
-  char *lbracket, *rbracket, *p, *q;
+  const char *lbracket, *rbracket, *p, *q;
 
   if (pattern == NULL && cmd == NULL) {
@@ -495,5 +502,5 @@
   if (mrdb->dbg->xm == DBG_QUIT) {
     struct RClass *exc;
-    exc = mrb_define_class(mrb, "DebuggerExit", mrb_class_get(mrb, "Exception"));
+    exc = mrb_define_class(mrb, "DebuggerExit", mrb->eException_class);
     mrb_raise(mrb, exc, "Exit mrdb.");
   }
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c	(revision 439)
@@ -19,5 +19,4 @@
   mrb_value expr;
   mrb_value result;
-  mrb_value s;
   uint8_t wcnt;
   int ai;
@@ -37,9 +36,10 @@
   }
 
-  result = mrb_debug_eval(mrb, mrdb->dbg, RSTRING_PTR(expr), RSTRING_LEN(expr), NULL);
+  result = mrb_debug_eval(mrb, mrdb->dbg, RSTRING_PTR(expr), RSTRING_LEN(expr), NULL, 0);
 
   /* $print_no = result */
-  s = mrb_str_cat_lit(mrb, result, "\0");
-  printf("$%lu = %s\n", (unsigned long)mrdb->print_no++, RSTRING_PTR(s));
+  printf("$%lu = ", (unsigned long)mrdb->print_no++);
+  fwrite(RSTRING_PTR(result), RSTRING_LEN(result), 1, stdout);
+  putc('\n', stdout);
 
   if (mrdb->print_no == 0) {
@@ -57,2 +57,25 @@
   return dbgcmd_print(mrb, mrdb);
 }
+
+dbgcmd_state
+dbgcmd_info_local(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_value result;
+  mrb_value s;
+  int ai;
+
+  ai = mrb_gc_arena_save(mrb);
+
+  result = mrb_debug_eval(mrb, mrdb->dbg, "local_variables", 0, NULL, 1);
+
+  s = mrb_str_cat_lit(mrb, result, "\0");
+  printf("$%lu = %s\n", (unsigned long)mrdb->print_no++, RSTRING_PTR(s));
+
+  if (mrdb->print_no == 0) {
+    mrdb->print_no = 1;
+  }
+
+  mrb_gc_arena_restore(mrb, ai);
+
+  return DBGST_PROMPT;
+}
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c	(revision 439)
@@ -20,5 +20,5 @@
       struct RClass *exc;
       puts("Start it from the beginning.");
-      exc = mrb_define_class(mrb, "DebuggerRestart", mrb_class_get(mrb, "Exception"));
+      exc = mrb_define_class(mrb, "DebuggerRestart", mrb->eException_class);
       mrb_raise(mrb, exc, "Restart mrdb.");
     }
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c	(revision 439)
@@ -6,5 +6,4 @@
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
 #include <ctype.h>
 
@@ -53,4 +52,5 @@
   {"help",      NULL,           1, 0, 1, DBGCMD_HELP,           dbgcmd_help},            /* h[elp] */
   {"info",      "breakpoints",  1, 1, 1, DBGCMD_INFO_BREAK,     dbgcmd_info_break},      /* i[nfo] b[reakpoints] */
+  {"info",      "locals",       1, 1, 0, DBGCMD_INFO_LOCAL,     dbgcmd_info_local},      /* i[nfo] l[ocals] */
   {"list",      NULL,           1, 0, 1, DBGCMD_LIST,           dbgcmd_list},            /* l[ist] */
   {"print",     NULL,           1, 0, 0, DBGCMD_PRINT,          dbgcmd_print},           /* p[rint] */
@@ -185,5 +185,5 @@
 mrb_debug_context_new(mrb_state *mrb)
 {
-  mrb_debug_context *dbg = mrb_malloc(mrb, sizeof(mrb_debug_context));
+  mrb_debug_context *dbg = (mrb_debug_context*)mrb_malloc(mrb, sizeof(mrb_debug_context));
 
   memset(dbg, 0, sizeof(mrb_debug_context));
@@ -224,10 +224,10 @@
 mrdb_state_new(mrb_state *mrb)
 {
-  mrdb_state *mrdb = mrb_malloc(mrb, sizeof(mrdb_state));
+  mrdb_state *mrdb = (mrdb_state*)mrb_malloc(mrb, sizeof(mrdb_state));
 
   memset(mrdb, 0, sizeof(mrdb_state));
 
   mrdb->dbg = mrb_debug_context_get(mrb);
-  mrdb->command = mrb_malloc(mrb, MAX_COMMAND_LINE+1);
+  mrdb->command = (char*)mrb_malloc(mrb, MAX_COMMAND_LINE+1);
   mrdb->print_no = 1;
 
@@ -505,5 +505,5 @@
 
 static int32_t
-check_method_breakpoint(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *regs)
+check_method_breakpoint(mrb_state *mrb, mrb_irep *irep, const mrb_code *pc, mrb_value *regs)
 {
   struct RClass* c;
@@ -511,4 +511,5 @@
   int32_t bpno;
   mrb_bool isCfunc;
+  struct mrb_insn_data insn;
 
   mrb_debug_context *dbg = mrb_debug_context_get(mrb);
@@ -518,9 +519,10 @@
   dbg->method_bpno = 0;
 
-  switch(GET_OPCODE(*pc)) {
+  insn = mrb_decode_insn(pc);
+  switch(insn.insn) {
     case OP_SEND:
     case OP_SENDB:
-      c = mrb_class(mrb, regs[GETARG_A(*pc)]);
-      sym = irep->syms[GETARG_B(*pc)];
+      c = mrb_class(mrb, regs[insn.a]);
+      sym = irep->syms[insn.b];
       break;
     case OP_SUPER:
@@ -544,5 +546,5 @@
 
 static void
-mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *regs)
+mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, const mrb_code *pc, mrb_value *regs)
 {
   const char *file;
@@ -567,6 +569,6 @@
   }
 
-  file = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
-  line = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
+  file = mrb_debug_get_filename(mrb, irep, pc - irep->iseq);
+  line = mrb_debug_get_line(mrb, irep, pc - irep->iseq);
 
   switch (dbg->xm) {
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h	(revision 439)
@@ -24,4 +24,5 @@
   DBGCMD_BREAK,
   DBGCMD_INFO_BREAK,
+  DBGCMD_INFO_LOCAL,
   DBGCMD_WATCH,
   DBGCMD_INFO_WATCH,
@@ -105,5 +106,5 @@
   struct mrb_irep *root_irep;
   struct mrb_irep *irep;
-  mrb_code *pc;
+  const mrb_code *pc;
   mrb_value *regs;
 
@@ -152,4 +153,5 @@
 dbgcmd_state dbgcmd_break(mrb_state*, mrdb_state*);
 dbgcmd_state dbgcmd_info_break(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_info_local(mrb_state*, mrdb_state*);
 dbgcmd_state dbgcmd_delete(mrb_state*, mrdb_state*);
 dbgcmd_state dbgcmd_enable(mrb_state*, mrdb_state*);
Index: EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.3.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h	(revision 331)
+++ EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h	(revision 439)
@@ -6,4 +6,12 @@
 #ifndef MRDBCONF_H
 #define MRDBCONF_H
+
+#ifndef MRB_ENABLE_DEBUG_HOOK
+# error mruby-bin-debugger need 'MRB_ENABLE_DEBUG_HOOK' configuration in your 'build_config.rb'
+#endif
+
+#ifdef MRB_DISABLE_STDIO
+# error mruby-bin-debugger conflicts 'MRB_DISABLE_STDIO' configuration in your 'build_config.rb'
+#endif
 
 /* configuration options: */
