Closed HerrAugust closed 2 years ago
printf should just work. Also if you hit F5 it should invoke the debugger where you can set break points and inspect variables.
Thank you! Debugger with break points both work, but printf does not. Maybe there is some hidden window in Visual Studio Code?
I did have an issue with printf when I didn't use the Microsoft C/C++ extension for debugging. It's been a while since I used printf, but it was there under one of the windows. Have you tried checking through all the output / terminal windows?
I just tried it. Interestingly it didn't show without a trailing newline (in my case printf("Hello world\n")
). The debugger opened a new terminal window to display it.
I confirm it on Ubuntu. To make it work it is necessary to put the \n at the end of printf:
printf("Hello\n");
@HerrAugust @microwavesafe @rzr @SIvaCoHan I use printf("Hello\n"); but it still no log。any body know why?
Hi all, is there any way to use
printf
or something similar to debug the code in Visual Studio Code v1.61.1+? Thanks!