Skip to content

build(string): Decouple AsciiString / UnicodeString debug pointer from RTS_DEBUG#2870

Closed
Caball009 wants to merge 1 commit into
TheSuperHackers:mainfrom
Caball009:build_macro_string_debug_ptr
Closed

build(string): Decouple AsciiString / UnicodeString debug pointer from RTS_DEBUG#2870
Caball009 wants to merge 1 commit into
TheSuperHackers:mainfrom
Caball009:build_macro_string_debug_ptr

Conversation

@Caball009

Copy link
Copy Markdown

This PR makes it possible to inspect strings AsciiString and UnicodeString in debug builds without RTS_DEBUG enabled.

RTS_DEBUG makes game starts noticeably slower so I don't always use it. It's still nice to be able to see the contents of strings in the Visual Studio debugger without any additional effort, though.

@Caball009 Caball009 added Minor Severity: Minor < Major < Critical < Blocker Build Anything related to building, compiling ThisProject The issue was introduced by this project, or this task is specific to this project labels Jul 13, 2026
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes string contents visible in debugger builds without requiring RTS_DEBUG.

  • Adds _DEBUG to the debug-pointer layout guard.
  • Initializes the debug pointers under the matching condition.
  • Applies the same change to ASCII and Unicode strings.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
Core/GameEngine/Include/Common/AsciiString.h Enables the private debugger pointer for _DEBUG builds.
Core/GameEngine/Include/Common/UnicodeString.h Enables the private debugger pointer for _DEBUG builds.
Core/GameEngine/Source/Common/System/AsciiString.cpp Initializes the ASCII debugger pointer with the matching guard.
Core/GameEngine/Source/Common/System/UnicodeString.cpp Initializes the Unicode debugger pointer with the matching guard.

Reviews (1): Last reviewed commit: "build(string): Decouple AsciiString/Unic..." | Re-trigger Greptile

@Caball009 Caball009 removed the ThisProject The issue was introduced by this project, or this task is specific to this project label Jul 13, 2026
@xezon

xezon commented Jul 13, 2026

Copy link
Copy Markdown

Is this for VC6 or modern Visual Studio?

Modern Visual Studio should be covered by the natvis.

@Caball009

Copy link
Copy Markdown
Author

Visual Studio.

Modern Visual Studio should be covered by the natvis.

How so?

@xezon

xezon commented Jul 13, 2026

Copy link
Copy Markdown

The natvis files are automatically loaded by Visual Studio. They make the debugger show the text.

image

->

image

@Caball009

Caball009 commented Jul 13, 2026

Copy link
Copy Markdown
Author

It stopped working for me at some point. I just reset the CMake cache and rebuild the entire solution and it's working again :)

I'm closing this PR.

@Caball009 Caball009 closed this Jul 13, 2026
@Caball009 Caball009 deleted the build_macro_string_debug_ptr branch July 13, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Anything related to building, compiling Minor Severity: Minor < Major < Critical < Blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants