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

Show non-crashing errors from the debugger #748

Open
m-radzikowski opened this issue Nov 9, 2024 · 4 comments
Open

Show non-crashing errors from the debugger #748

m-radzikowski opened this issue Nov 9, 2024 · 4 comments

Comments

@m-radzikowski
Copy link

Godot version

4.3.stable

VS Code version

1.95.2

Godot Tools VS Code extension version

2.3.0

System information

Windows 11

Problem statement

Some errors do not crash Godot - for example signals handlers with improper number of arguments. Those are only displayed in the Debugger -> Errors tab in the Godot editor:

image

E 0:00:00:0588 battle.gd:17 @ @selected_unit_setter(): Error calling from signal 'unit_selection_changed' to callable: 'HBoxContainer(hit_chance_bar.gd)::_on_attacker_changed': Method expected 2 arguments, but called with 1.

However, they do not show up in the VS Code, the Debug Console, or the Output -> Godot Debugger.

When you only always ever run from VS Code, you end up not seeing errors that silently break the game.

Proposed solution

Show the errors from the Godot Debugger -> Errors tab. I wouldn't mind having them in the Debug Console, mixed with my own logs, but at least very visible.

Another option would be to break on those errors, but I don't think this is possible in Godot itself.

Unless, of course, this should already work and it does not for me for some reason?

@DaelonSuzuka
Copy link
Collaborator

You are absolutely correct, errors are not being routed to the debug console! I can't believe I missed that when I rewrote the debugger (and nobody noticed until now)!

Thanks for the report.

@DaelonSuzuka
Copy link
Collaborator

DaelonSuzuka commented Nov 9, 2024

IGNORE ALL OF THIS

Here's what I got so far:

image

I would love to find a way to make these collapsible... It's clearly possible because debugging nodejs gets you this:

image

I figured it out!

image

@kevzettler
Copy link

does this also effect use of push_errors ? I am not seeing any of those messages in the vscode debug console

@DaelonSuzuka
Copy link
Collaborator

@kevzettler This PR hasn't been published yet.

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

No branches or pull requests

3 participants