Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Editor is not started when clicking on the Stack Frames in Debugging panel #19838

Open
API-Beast opened this issue Jun 29, 2018 · 8 comments · May be fixed by #89523
Open

External Editor is not started when clicking on the Stack Frames in Debugging panel #19838

API-Beast opened this issue Jun 29, 2018 · 8 comments · May be fixed by #89523

Comments

@API-Beast
Copy link

API-Beast commented Jun 29, 2018

Godot version:
3.0.4

OS/device including version:
Windows 8.1

Issue description:
When setting Godot to use a external editor for editing scripts it won't run the external editor when clicking on the Stack Frames in the Debugger/Debugger tab.

It does run the editor when clicking on the entries in the stack trace of the Debugging/Error tab but many issues don't generate a stack trace in that tab. The built-in editor isn't opened either, forcing you to disable "Use External Editor" during debugging and re-enabling it once finished.

@API-Beast API-Beast changed the title Godot doesn't start External Editor when clicking on error messages in Debugging panel External Editor is not started when clicking on the Stack Frames in Debugging panel Jun 29, 2018
@rcorre
Copy link
Contributor

rcorre commented Jul 8, 2018

Same issue on Linux using neovim as an external editor.
An example of an error that shows in the "Debugger/Debugger" tab but not in the "Debugging/Error" tab:

Invalid type in built-in function 'rand_range'. Cannot convert argument 2 from Nil to float.

@API-Beast
Copy link
Author

API-Beast commented Jul 12, 2018

Found two more situations in which neither the external editor nor the internal editor is launched:

  • If the script is internal
  • When using the "Make Function" setting in the Signal Editor

@rcorre
Copy link
Contributor

rcorre commented Jul 12, 2018 via email

@akien-mga
Copy link
Member

Is this still reproducible in the current master branch?

@rcorre
Copy link
Contributor

rcorre commented Feb 5, 2019

@akien-mga yes, just tried 3.1.beta.custom_build.16d4021 with exec_path=st, exec_flags=nvim {file} +{line}. One of these shows up in "errors" every time I double-click a line in the stack:

E 0:00:04:0725   Condition ' _debug_parse_err_line >= 0 ' is true. returned: __null
  <C Source>     modules/gdscript/gdscript_editor.cpp:321 @ debug_get_stack_level_instance()

@KoBeWi
Copy link
Member

KoBeWi commented Jun 17, 2020

Still valid in 3.2.2 rc1. Tested with VS Code, clicking Stack Frames doesn't even open the file.

The issues mentioned in #19838 (comment) are fixed.

EDIT:
Pic to show what doesn't work:
image
It opens in the internal editor.

@duane-r
Copy link

duane-r commented Feb 22, 2021

In v3.2.4.rc2, nothing happens when I click on a stack frame in the debugger tab -- neither the internal nor external editors open -- as long as the external editor is enabled.

@painttist
Copy link

Hi, in v4.2.2.rc, I am still having this issue.

After some digging around, I found out that this is related to ScriptEditor::edit inside editor>plugins>script_editor_plugin.cpp, in line 2308, there is an if statement that prevents debugger script being opened in an external editor unless an option DEBUG_WITH_EXTERNAL_EDITOR is checked. To my understanding, this toggleable option is currently only accessible by setting a shortcut for item "Debug with External Editor".

I suspect that there used to be a checkbox that could be used to toggle this setting but is now removed?

I would love to contribute further and submit a PR to fix this issue but I am uncertain if I should simply remove part of the if statement in line 2308 or should I attempt to add back a checkbox?

painttist added a commit to painttist/godot that referenced this issue Mar 15, 2024
Removes part of an if statement that prevents opening external editor for stack frame cells unless a shortcut binding is set for item Debug with External Editor.

Fixes godotengine#19838
painttist added a commit to painttist/godot that referenced this issue Mar 15, 2024
Removes part of an if statement that prevents opening external editor for stack frame cells unless a shortcut binding is set for item Debug with External Editor.

Fixes godotengine#19838
painttist added a commit to painttist/godot that referenced this issue Mar 15, 2024
Removes part of an if statement that prevents opening external editor for stack frame cells unless a shortcut binding is set for item Debug with External Editor.

Fixes godotengine#19838
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants