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

Implement warnings and errors in Debug Console #749

Merged
merged 14 commits into from
Nov 18, 2024

Conversation

DaelonSuzuka
Copy link
Collaborator

#748 noticed that warnings and errors were never hooked up to the debug console.

The items are expandable/collapsible, and the links on the right side of the panel work for any file inside the user's project.

Taskmgr_cUj72S8QmK

Taskmgr_KOKVPwhPtV

@DaelonSuzuka DaelonSuzuka merged commit 709fa1b into godotengine:master Nov 18, 2024
4 checks passed
@Kevin-Jonaitis
Copy link

Kevin-Jonaitis commented Dec 23, 2024

FYI, I was trying to run a build of the extension built from master to pick up this change...unfortunately #731 (which is on master but not released yet) seems to break the debugger if you're using typed arrays(I'm running godot 4.3 fwiw). This PR which is currently not merged yet fixes again the typed arrays: #764

All that to say, master is indeed unstable, and pull in #764 if you want a stable version

@DaelonSuzuka
Copy link
Collaborator Author

@Kevin-Jonaitis Typed Arrays, or Typed Dictionaries? #764 is for Typed Dict support, and I don't think there's been a regression with respect to Typed Arrays.

@Kevin-Jonaitis
Copy link

Kevin-Jonaitis commented Jan 3, 2025

@DaelonSuzuka apologies I just saw this. #731 did indeed cause a regression for me. The typed dictionary change #764 seemed to fix the typed arrays change #731 that caused the regression. When I was digging in a bit it seems they touched the same bits of code, which is perhaps why the regression was fixed with a seemingly unrelated change. I didn't try to understand exactly why it fixed it because I was happy enough to just have it working by pulling in the new change.

Here's a minimum reproducible piece of code I was able to use to repo the regression caused by #731. I just ran this and I couldn't see anything in the debugger when I set a breakpoint in the _ready() function. Adding #764 in addition to #731 fixed this. I was running the latest released version of godot 4.3

extends Node2D

var vectors: Array[Vector2] = []

# Called when the node enters the scene tree for the first time.
func _ready() -> void:	
	vectors.append(Vector2(0,0))
	pass

func _process(delta: float) -> void:
	var test = vectors

func _draw():
	pass

@DaelonSuzuka DaelonSuzuka deleted the debug_console_errors branch January 4, 2025 02:11
@Electroshockist
Copy link

I, too, am having this problem. It becomes really annoying when trying to use built-in typed arrays likeArea2D.get_overlapping_bodies().

The only way i've found to fix this is to append arrays with different data types. Explicitly typing as a generic array doesn't seem to work.

Here are some images:
Screenshot 2025-01-11 201943
Screenshot 2025-01-11 202057

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

Successfully merging this pull request may close these issues.

3 participants