pygdbmi icon indicating copy to clipboard operation
pygdbmi copied to clipboard

'\n' inside output discarded

Open Zhangwen-Zhiyuan opened this issue 1 year ago • 0 comments

Describe the bug When debugging a program that outputs strings containing '\n', the output is split at each '\n'. If the output includes multiple consecutive '\n', these newline characters are discarded.

To Reproduce If debugging a C++ program with a statement like std::cout << "aaa\n\n\n\n\nbbb\n\n\n" << std::endl;, pygdbmi presents two separate output messages containing "aaa" and "bbb", respectively. The information regarding the quantity of '\n' between them is not retained.

Expected behavior The '\n' characters should be preserved as-is within the program's output.

OS: Ubuntu 18 pygdbmi version (pip freeze output): 0.11.0.0

Zhangwen-Zhiyuan avatar Apr 25 '24 09:04 Zhangwen-Zhiyuan