1

I have a problem where whenever I debug a C program my terminal does not accept input, or scanf in this case. Everything else seems to be working, the debugger prints out everything and stops at breakpoint. When I start the program without debugging I can write to the terminal. Please help

Thank you

enter image description hereenter image description here enter image description here enter image description here

17
  • Did you add -g to the compiler flags? It adds debugging symbols. Dec 11, 2020 at 10:14
  • Can you explain how I do that? Sorry I am not good at this.
    – ErayZaxy
    Dec 11, 2020 at 10:25
  • Is it in the tasks.json?
    – ErayZaxy
    Dec 11, 2020 at 10:25
  • Please provide a minimal reproducible example. There are many pitfalls with using scanf and one of them might only be visible while debugging.
    – Yunnosch
    Dec 11, 2020 at 10:25
  • #include <stdio.h> int main() { int c; scanf("%i", &c); printf("%i", c); }
    – ErayZaxy
    Dec 11, 2020 at 10:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.