summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_script.cpp
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2015-12-29 12:11:21 -0300
committerreduz <reduzio@gmail.com>2015-12-29 12:11:21 -0300
commit7d2d1442f83e6a7a57a1823a6cf5af53e5419d5f (patch)
tree06c26e9630e74b88bc860ad8e824855e85c03791 /modules/gdscript/gd_script.cpp
parent99736e63e45b323d06411926bd92210a08c717c2 (diff)
downloadredot-engine-7d2d1442f83e6a7a57a1823a6cf5af53e5419d5f.tar.gz
-add breakpoint statement to ease with debugging, closes #3165
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r--modules/gdscript/gd_script.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index 70c7887766..1c19328fe8 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<String> *p_words) const {
"or",
"export",
"assert",
+ "breakpoint",
"yield",
"static",
"float",