Skip to content

🔍 Improve debug connection trace output - #648

Open
nevans wants to merge 1 commit into
masterfrom
improved-debug-trace-output
Open

🔍 Improve debug connection trace output#648
nevans wants to merge 1 commit into
masterfrom
improved-debug-trace-output

Conversation

@nevans

Copy link
Copy Markdown
Collaborator

This uses String#dump to print out control characters legibly, which makes the CRLF line endings explicit and enables reliable copy/pasting of logged data for tests or debugging.

This also improves how sent/rcvd data is interleaved (in my opinion).

Note that, because client-sent data is generally in the main/application thread(s) (inside #synchronize), and server responses are received in the server thread (not synchronized), this did have a threading race condition. So this updated version uses synchronize to log the server responses.

This uses String#dump to print out control characters legibly, whic
makes the CRLF line endings explicit and enables reliable copy/pasting
of logged data for tests or debugging.
This also improves how sent/rcvd data is interleaved (in my opinion).
Note that, because client-sent data is generally in the main/application
thread(s) (inside `#synchronize`), and server responses are received in
the server thread (_not_ synchronized), this did have a threading race
condition. So this updated version uses `synchronize` to log the server
responses.
@nevans
nevansforce-pushed the improved-debug-trace-output branch from c8e12dc to 7f966feCompareApril 24, 2026 14:27
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@nevans