Fixes argument truncation where long `launch.json` arguments were cut off at ~2KB, causing debugger launch failures. by Subham-KRLX · Pull Request #1529 · microsoft/MIEngine
First off, I want to thank you for taking the time to figure this out, and for taking the time to send this PR. Also, sorry it has taken us a while to respond.
I am very glad you found something that seems to work, but I don't understand why it works -- the way things should work is that the size of the buffer only matters for performance reasons: MIEngine should write to the buffer until it hits the limit, at which point the write should block, then lldb-mi should read the bytes out of the buffer, which should then let MIEngine write the next set of bytes etc until the command is written. So, I don't have a good theory for why changing the buffer size fixes things. The only thought I had is maybe lldb-mi has a bug in the way it is reading from the buffer where it is giving up after a read of some size succeeds even if it lacks a trailing newline, but this is very much a guess.
Did you understand why the fix works?
If you set a breakpoint where the command is written (which I believe should be the _writer?.WriteLine(cmd) call here), are you seeing cmd be the full un-truncated string?
BTW: Most folks are my team will be off for the holidays after this week, so if you reply, it might be a bit of time before we get back to you.