eclipse-cdt-cloud / cdt-gdb-adapter

CDT GDB Debug Adapter
Eclipse Public License 2.0
28 stars 40 forks source link

Add newline characters to every OutputEvent emitted regarding UART output #280

Closed AdhamRagabMCHP closed 1 year ago

AdhamRagabMCHP commented 1 year ago

This PR adds newlines to every OutputEvent emitted for UART output to the debug console. It matches the OS it is on + the eolCharacter specified in the launch.json. See https://github.com/eclipse-cdt-cloud/cdt-gdb-vscode/pull/91 for an initial discussion on why this came to be.

AdhamRagabMCHP commented 1 year ago

Seems that using os.EOL causes issues on Windows...let me see why that is

AdhamRagabMCHP commented 1 year ago

To client: {"seq":0,"type":"event","event":"output","body":{"category":"Socket","output":"Hello World!\r\r\n"}}

It has two carriage return characters. Let me see how to ensure how this doesn't happen.

AdhamRagabMCHP commented 1 year ago

Ah - It's because of the test. Let me fix it.

AdhamRagabMCHP commented 1 year ago

Test should be fixed on Windows now.

AdhamRagabMCHP commented 1 year ago

Tests now have passed.