This document captures practical ideas for improving windbgmsg, a Rust Windows CLI that listens to DBWIN_* debug output, optionally filters by process, and prints matching OutputDebugString messages.
- The project builds successfully with
cargo check. - The code is formatted with
cargo fmt --check. - Clippy passes with
cargo clippy --all-targets -- -D warnings. cargo testpasses, but there are currently no tests.- The app currently supports:
- Capturing debug output from all processes.
- Capturing debug output from all current processes matching one process name.
- Following a process name with
--follow-name. - Waiting for a named process with
--wait. - Basic
--helpoutput.
- Add
--pid <pid>for direct PID capture. - Allow multiple process filters, such as repeated
--process name.exevalues. - Add
--listto show matching processes before capture starts.
- Add timestamps to each message.
- Support local time, UTC, or epoch timestamp formats.
- Add
--output file.logfor writing captured messages to a file. - Add
--appendto preserve existing logs. - Add
--jsonlfor structured line-delimited JSON output. - Add
--csvfor spreadsheet-friendly output. - Include process name alongside PID.
- Add colorized console output.
- Add
--rawfor scripting-friendly output.
- Add
--contains <text>to include only matching messages. - Add
--exclude <text>to suppress noisy messages. - Add
--regex <pattern>for advanced filtering. - Add
--case-sensitivefor stricter matching. - Add
--count <n>to exit after capturing a fixed number of messages. - Add
--duration <time>to capture for a bounded time, such as30sor5m.
- Replace manual argument parsing with
claporlexopt. - Reject unknown arguments instead of silently ignoring them.
- Add
--wait-timeout <time>so--waitcannot run forever by accident. - Print periodic status while waiting for a process to appear.
- Add clearer examples to
--help.
- Add RAII handle wrappers so opened events and file mappings are always closed.
- Check failures from
SetEvent. - Check failures from
UnmapViewOfFile. - Format Win32 errors into readable messages instead of only numeric codes.
- Consider using
windows-sysinstead of hand-maintained FFI definitions.
- Current decoding only prints valid UTF-8 messages.
- Add a lossy fallback so invalid UTF-8 does not silently disappear.
- Consider Windows ANSI code page decoding for compatibility with older applications.
- Unit-test argument parsing.
- Unit-test message filtering.
- Unit-test output formatting.
- Split formatting/filtering logic away from the Win32 capture loop to make it testable.
- Add a Windows integration test helper that calls
OutputDebugString. - Update CI to run:
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo testcargo build --release
- Add a proper CLI parser with
clap. - Add
--pid. - Add timestamps.
- Add
--outputand--jsonl. - Add RAII cleanup for Windows handles.
- Add parser, filter, and formatter tests.
This roadmap keeps the app small while making it more useful as a diagnostics tool.