diff options
| author | Juan Linietsky | 2015-08-04 09:47:32 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-08-04 09:47:32 -0300 |
| commit | d1da2c29955c851d74037a5196168a0a90507f9a (patch) | |
| tree | c51bb0c05da46a368fe712a5a494af591b9f1484 /modules/gdscript/gd_script.h | |
| parent | cbee679bd78c1b3317db1ea4e349f278576304a1 (diff) | |
| download | godot-d1da2c29955c851d74037a5196168a0a90507f9a.tar.gz godot-d1da2c29955c851d74037a5196168a0a90507f9a.tar.zst godot-d1da2c29955c851d74037a5196168a0a90507f9a.zip | |
Diffstat (limited to 'modules/gdscript/gd_script.h')
| -rw-r--r-- | modules/gdscript/gd_script.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h index 1e1279d5f..fe325ff71 100644 --- a/modules/gdscript/gd_script.h +++ b/modules/gdscript/gd_script.h @@ -475,6 +475,19 @@ public: } + virtual Vector<StackInfo> debug_get_current_stack_info() { + if (Thread::get_main_ID()!=Thread::get_caller_ID()) + return Vector<StackInfo>(); + + Vector<StackInfo> csi; + csi.resize(_debug_call_stack_pos); + for(int i=0;i<_debug_call_stack_pos;i++) { + csi[_debug_call_stack_pos-i-1].line=_call_stack[i].line?*_call_stack[i].line:0; + csi[_debug_call_stack_pos-i-1].script=Ref<GDScript>(_call_stack[i].function->get_script()); + } + return csi; + } + struct { StringName _init; |
