How to display stuff in VS Code debug console without `std::endl`?
问题 When debugging an app using std::cout to print something, nothing appears in the debug console (3rd tab, not external console). One of the exceptions seems to be the use of std::endl : #include <iostream> #include <Windows.h> using namespace std; int main() { while(true) { Sleep(500); std::cout << "Hello world!" << std::endl; // Works } } #include <iostream> #include <Windows.h> using namespace std; int main() { while(true) { Sleep(500); std::cout << "Hello world!\n"; // Doesn't work // std: