Skip to content

Fix client debugscript not buffering startup logs - #5268

Open
MohabCodeX wants to merge 3 commits into
multitheftauto:masterfrom
MohabCodeX:fix/debugscript-startup-buffering
Open

Fix client debugscript not buffering startup logs#5268
MohabCodeX wants to merge 3 commits into
multitheftauto:masterfrom
MohabCodeX:fix/debugscript-startup-buffering

Conversation

@MohabCodeX

@MohabCodeX MohabCodeX commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

PR #4323 caused early outputDebugString calls and startup logs to get discarded before /debugscript is opened, because players start with debug level 0. This restores log buffering while on debugscript 0 so running /debugscript 3 later still shows past history.

Thanks to @rxyyy for catching and reporting this regression.

Note on Debug builds: Debug builds (MTA_DEBUG) will still not buffer startup logs while the debug window is closed due to this check:

#ifdef MTA_DEBUG
if (!g_pCore->IsDebugVisible())
return;
#endif

I kept that untouched to keep this PR strictly minimal, but the issue is completely fixed for standard Release builds.

Testing

  1. On debugscript 0, run crun outputDebugString("buffered log", 3).
  2. Run debugscript 3 -> log should appear in the console.
  3. Switch to debugscript 1:
    • crun outputDebugString("test warn", 2) -> filtered out.
    • crun outputDebugString("test err", 1) -> displayed in red.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Aug 30, 2026
@FileEX FileEX added this to the 1.7 (Current) milestone Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants