microsoft / vscode-serial-monitor

Serial Monitor that allows for reading and writing to serial ports. Official issue tracking repository for Microsoft's Serial Monitor VS Code extension.
MIT License
55 stars 5 forks source link

In hex view, add text representation column view alongside #175

Open EGOKM opened 3 months ago

EGOKM commented 3 months ago

Type: Feature Request

Hello, I wanted to propose some hints for a "better" Serialmonitor as follows:

shot-2024-04-09_13-56-18 shot-2024-04-09_14-25-37

Probably it will be also useful for some other users ;-),

THX a lot, Enrico

pkoevesdi commented 2 months ago

I totaly also wish the hex output was supported by a column of printable characters. Otherwise I have no orientation in my output to identify my nonprintable bytes between the printable ones.

EGOKM commented 2 months ago

well, some kind of those ecape'd numers ( like \xHH or \n, \r, etc.) will be useful in text mode view, if there is some human readable stream over serial sometimes there are "stray" non-ascii bytes to be identified, or probably checksum's, for example: it may show "\x02Hello\x03", meaning there is an STX, then "Hello" follow'd by ETX ;-), same notation maybe also useful when sending some bytes in text mode ...

pkoevesdi commented 2 months ago

well, some kind of those ecape'd numers ( like \xHH or \n, \r, etc.) will be useful in text mode view, if there is some human readable stream over serial sometimes there are "stray" non-ascii bytes to be identified, or probably checksum's, for example: it may show "\x02Hello\x03", meaning there is an STX, then "Hello" follow'd by ETX ;-), same notation maybe also useful when sending some bytes in text mode ...

But please not for "normal" letters inside words. I.e. please show "Menüpunkt", not "Men\xxpunkt". See also #168

EGOKM commented 2 months ago

ok, if You really want that there must be an additional setting for encoding ;-), if You want to see "ü" here there are at least 2 choices: one is to use extended ASCII ( CodePage 437, "ü" is 0x81 here ) OR use UTF-encoding (0xc3 0xbc) ... more complicated but possible ;-)

gcampbell-msft commented 2 months ago

@EGOKM @pkoevesdi Could you elaborate more on the feedback for "a column of printable characters"? Currently the hex mode does print in columns, so I'm not sure what it is that you're requesting. Thanks!

pkoevesdi commented 2 months ago

Something like this: th You see the right side, where the bytes are repeated with their 1-byte-character representation, as far as printable, as an orientation.

pkoevesdi commented 2 months ago

ok, if You really want that there must be an additional setting for encoding ;-)

Right. Or take the system default. Or recognize whether it is a 1-byte character set, assume it's ISO 8859-1, otherwise UTF-8.

EGOKM commented 2 months ago

@gcampbell-msft there is already an extension called Hex Editor ( original Microsoft ;-) - same View ( but without Addresses ), also, what about all the other thoughts ? Possible to make it ?

gcampbell-msft commented 2 months ago

@pkoevesdi Ah, I understand your request for the printable characters off to the side. This is definitely possible. We can put it on the backlog, however I'm not sure when we will get to it. Either way, we will mark this as "needs-more-upvotes" so that people can vote on the issue.

@EGOKM I think this would be the main feature that we might consider, but again, we're not sure when we'd get to this feature. Thanks!

EGOKM commented 2 months ago

@gcampbell-msft well, regarding "we're not sure when we'd get to this feature" - it would be probably speed up things when You place the source code here, this way many people may contribute to it :-)