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

Windows: Expand godot.natvis type coverage #99042

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Nov 11, 2024

Adds several new types to godot.natvis, particularly the Variant structs. Makes the display string representation equivalent to their String operator output where possible. Additionally, this adds godot.natvis as a dependancy to the executable itself, meaning editing just that file will trigger a relink on build. Also in testing, TypedArray already inherits debug display from Array, so that redundant section was removed

Comment on lines +63 to +64
if env.msvc:
env.Depends(prog, "godot.natvis")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically it's only a dependency with env["vsproj"], no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, no! The file can be used when debugging even without a Visual Studio project, provided it's properly assigned. I debug in VSCode almost exclusively, and it ztill works

Copy link
Member

@akien-mga akien-mga Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's not compiled into the binary in these cases, is it?
Doesn't this imply that a change to the .natvis file means recompiling the whole engine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It recompiles the link step on the executable, so not the whole engine. Truthfully, I'm not sure what the deal with it is, beyond that it needed to be relinked before changes showed up in the debugger

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right my bad, it is passed to the linker:

platform/windows/detect.py
599:    env.Append(LINKFLAGS=["/NATVIS:platform\\windows\\godot.natvis"])

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use Visual Studio much so I can't review in depth, but if it makes the debugging experience better, it seems good to me.

@Repiteo Repiteo force-pushed the windows/natvis-improvements branch from 48e2b4d to 9bf6288 Compare November 11, 2024 19:47
@Repiteo Repiteo merged commit 316293e into godotengine:master Nov 12, 2024
20 checks passed
@Repiteo Repiteo deleted the windows/natvis-improvements branch November 12, 2024 15:36
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.

2 participants