Is there any way to use cout for debugging while running an ncurses program in another window?

StackOverflow https://stackoverflow.com/questions/22897206

  •  28-06-2023
  •  | 
  •  

문제

I'm playing around with a simple ncurses program to move sprites around a screen. Most of the backend logic is in C++. Apparently Xcode won't with ncurses at all, so I need some other way to debug my program. I don't know C or Unix that well - is there any way I could have my program spawn another Terminal window, which would run alongside the window where ncurses is running? I'd like to be able to use cout in that window to monitor the state of my program.

도움이 되었습니까?

해결책

Use gdb and the "attach" command to attach to your running process.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top