AdamJames
AdamJames

Reputation: 367

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

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.

Upvotes: 0

Views: 205

Answers (1)

Mark Setchell
Mark Setchell

Reputation: 207728

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

Upvotes: 1

Related Questions