From 7d2d1442f83e6a7a57a1823a6cf5af53e5419d5f Mon Sep 17 00:00:00 2001 From: reduz Date: Tue, 29 Dec 2015 12:11:21 -0300 Subject: -add breakpoint statement to ease with debugging, closes #3165 --- modules/gdscript/gd_script.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/gdscript/gd_script.cpp') diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 70c788776..1c19328fe 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1077,6 +1077,14 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a ip+=2; } continue; + case OPCODE_BREAKPOINT: { +#ifdef DEBUG_ENABLED + if (ScriptDebugger::get_singleton()) { + GDScriptLanguage::get_singleton()->debug_break("Breakpoint Statement",true); + } +#endif + ip+=1; + } continue; case OPCODE_LINE: { CHECK_SPACE(2); @@ -2672,6 +2680,7 @@ void GDScriptLanguage::get_reserved_words(List *p_words) const { "or", "export", "assert", + "breakpoint", "yield", "static", "float", -- cgit v1.2.3-70-g09d2