debugger: fix debugger failure when passing commands with non-latin symbols
Debug agent incorrectly used Content-Length and cut Content-Length symbols instead of Content-Length bytes from debugger protocol messages. This causes incorrect command body extraction and parsing that leads to debugger disconnection.
I use to fix the issue code similar to https://github.com/nodejs/node/blob/master/lib/_debugger.js#L136 This fixes debugger problem mistakenly reported here https://github.com/Microsoft/vscode/issues/17389
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
debugger