1
0
Fork 0

Merge pull request #113773 from KoBeWi/built_in_error_opener_now_in_godot

Fix opening errors from built-in scripts
This commit is contained in:
Rémi Verschelde 2025-12-17 22:27:02 +01:00
commit 789bdbd25d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,10 @@ void EditorDebuggerNode::_stack_frame_selected(int p_debugger) {
}
void EditorDebuggerNode::_error_selected(const String &p_file, int p_line, int p_debugger) {
if (!p_file.is_resource_file() && !ResourceCache::has(p_file)) {
// If it's a built-in script, make sure the scene is opened first.
EditorNode::get_singleton()->load_scene(p_file.get_slice("::", 0));
}
Ref<Script> s = ResourceLoader::load(p_file);
emit_signal(SNAME("goto_script_line"), s, p_line - 1);
}