Skip to content

Conversation

@MichaelXt
Copy link
Contributor

@MichaelXt MichaelXt commented Feb 13, 2025

Fixes multiple issues with variables window for godot 4 projects.
vscode-godot-vars

Note: there is a great initiative of bringing DAP implementation directly into godot debug engine: https://github.com/godotengine/godot/blob/af56d6e8e88e56110577f3bbcfa2eb5cdcc71356/editor/debugger/debug_adapter/debug_adapter_protocol.cpp by @rsubtil and others. We will still need the backward-compatible implementation for now, which also includes remote scene inspector. In future, once the godot server DAP implementation matures, and where will be no need for backward compatibility, we should switch directly to it.

  • Redesigned the representation of godot objects to match internal structure of godot server
  • Lazy evaluation for the godot objects
  • Stack frames now can be switched with variables updated

@MichaelXt MichaelXt changed the title DebugAdapter variables overhauld DebugAdapter variables overhaul Feb 13, 2025
@MichaelXt MichaelXt marked this pull request as ready for review February 13, 2025 02:47
@DaelonSuzuka
Copy link
Collaborator

Thanks for linking that issue, I haven't been following engine development that closely so I didn't know this was happening.

Will the DAP implementation support the remote scene inspector?

@MichaelXt
Copy link
Contributor Author

MichaelXt commented Feb 13, 2025

@MichaelXt
Copy link
Contributor Author

MichaelXt commented Feb 13, 2025

  • Better presentation for arrays (in-line values, like in vscode javascript DAP)
  • Callable and Signal vars are now displayed (though not expandable)

image

  • Recursive Node references can be viewed properly:

image

@MichaelXt
Copy link
Contributor Author

Thanks for linking that issue, I haven't been following engine development that closely so I didn't know this was happening.

Will the DAP implementation support the remote scene inspector?

I'm not sure - just found by looking at the code. @rsubtil should know better.

@DaelonSuzuka, could you review/recommend who can review this PR? Thanks again for maintaining and improving this extension, it is very useful!

@DaelonSuzuka DaelonSuzuka self-requested a review February 14, 2025 02:12
@DaelonSuzuka
Copy link
Collaborator

Yeah I'm gonna review it tomorrow or this weekend.

@DaelonSuzuka
Copy link
Collaborator

I should know better than to put time estimates into github comments.

I'll definitely get to it this weekend, though.

@rsubtil
Copy link
Member

rsubtil commented Feb 22, 2025

Will the DAP implementation support the remote scene inspector?

Sorry for the delay; the DAP backend in Godot is basically complete ever since the first implementation, and it didn't have much further work since then. The only really big addition recently was some improvements in object inspection and REPL functionality (godotengine/godot#97585).

The issue with the remote scene inspector is that it is a Godot specific feature, and DAP is agnostic, so there is no way from my understanding to map it into an existing structure. But, you can actually access Godot specific data from DAP, as I've implemented a custom capability precisely for these scenarios. It should still be working (but from my knowledge hasn't been used yet on any plugin, so it definitely needs some testing): https://gist.github.com/rsubtil/01067153db5608d48773719fa63ab2b8#expose-godots-custom-communication

@DaelonSuzuka DaelonSuzuka merged commit 53f48ed into godotengine:master Feb 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants