Reputation: 6071
UPDATE: At time of asking this question, this was related to SignalR library and not plain WebSockets. I see correctly formatted messages now.
Is there any way to word-wrap messages in WS
tab in Chrome Developer Tools or display JSON
with formatting ? It's really annoying to scroll to right to see whole message.
Example with message selected and it's preview doesn't have any formatting or word wrapping applied:
Thank you in advance.
Upvotes: 3
Views: 2101
Reputation: 1442
The character you are seeing at the end of every message (\u001e, ASCII "Record Separator", hex 0x1E) is used by SignalR as a message delimiter. This is not a bug or a mistake; it's a design choice to help the SignalR client library distinguish between different messages when they are received.
The delimiter exists because SignalR needs a way to indicate where one message ends and the next begins, especially when multiple messages are sent over a single connection. This is especially useful in environments where messages can be chunked or concatenated together.
Ideally, Chrome would hide delimiters and then the display of formatted messages should work.
Upvotes: 2
Reputation: 9229
It's working fine here on Chrome/78.0.3904.97
:
What I did:
"permessage-deflate"
extension, which ruins the demonstration.Upvotes: 3