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

Send debug messages to Windows debugger #78838

Merged
merged 19 commits into from
Jan 30, 2025

Conversation

alef
Copy link
Contributor

@alef alef commented Dec 29, 2024

Summary

Infrastructure "Send debug messages to Windows debugger"

Purpose of change

In addition to debug.log, send all debug messages to Windows debugger via OutputDebugStringA.

Describe the solution

Add a wrapper class to intercept streambuf methods. This will make possible to grow a string and flush to OutputDebugStringA later.

Not required, but also:

  • changed PATH_INFO::debug to a cata_path, like others
  • changed DebugFile interface
  • flush/sync debug.log now and then

Describe alternatives you've considered

None

Testing

  • ✔ vscode: CMake MSVC build and launch.json with a debugger
  • ✔ vscode: CMake MSVC build and run from terminal with Sysinternal's Dbgview
  • regressions ?
  • MSYS2/MINGw ?

Additional context

PR in draft because of some ideas want to work on later but still get some feedback.

image

image

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions and removed astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Dec 29, 2024
@alef alef marked this pull request as ready for review January 3, 2025 19:40
@GuardianDll
Copy link
Member

GuardianDll commented Jan 8, 2025

PR can't pass a basic build test, and it doesn't look like a random test fail for me

@alef alef force-pushed the outputdebugstringa branch from 323f7fa to e85438c Compare January 28, 2025 21:45
@akrieger
Copy link
Member

Going to have to fix fs -> std::filesystem.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 30, 2025
@GuardianDll GuardianDll merged commit 032101a into CleverRaven:master Jan 30, 2025
26 of 27 checks passed
@alef alef deleted the outputdebugstringa branch January 30, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants