From 3754f6cd755c5ab266869a33abdde87db4845712 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 28 Jun 2016 11:49:18 -0300 Subject: [PATCH] Properly show the source:line even in inner clases, closes #3766 --- modules/gdscript/gd_editor.cpp | 2 +- modules/gdscript/gd_function.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index b1da7e782c5..07a5a636d4e 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -212,7 +212,7 @@ String GDScriptLanguage::debug_get_stack_level_source(int p_level) const { ERR_FAIL_INDEX_V(p_level,_debug_call_stack_pos,""); int l = _debug_call_stack_pos - p_level -1; - return _call_stack[l].function->get_script()->get_path(); + return _call_stack[l].function->get_source(); } void GDScriptLanguage::debug_get_stack_level_locals(int p_level,List *p_locals, List *p_values, int p_max_subitems,int p_max_depth) { diff --git a/modules/gdscript/gd_function.h b/modules/gdscript/gd_function.h index 1f790eaadcf..942db170c8e 100644 --- a/modules/gdscript/gd_function.h +++ b/modules/gdscript/gd_function.h @@ -160,6 +160,7 @@ public: int get_default_argument_count() const; int get_default_argument_addr(int p_idx) const; GDScript *get_script() const { return _script; } + StringName get_source() const { return source; } void debug_get_stack_member_state(int p_line,List > *r_stackvars) const;