http://www.perlmonks.org?node_id=996801
alexx_sh has asked for the wisdom of the Perl Monks concerning the following question:

Hello. I try debug curses program in eclipse. I need to run getch() in non-blocking mode. Eclipse console ugly, doesn't support many esc code and non-blocking mode for read key.
#!/usr/bin/env perl use Curses; my $win = Curses->new or die "Can't get new window\n"; initscr(); noecho(); raw(); nodelay(1); $win->keypad(1); $win->addstr ("Try press key\n") while ((my $key = $win->getch()) ne ERR) { $win->addstr ("key $key\n"); #<-breackpoint }
If i try run this code with redirect console to /dev/pty/1 in eclipse debugger configuration. When i press key in /dev/pty/1 breackpoint doen't work and i can't see text. How setup eclipse to redirect stdin from /dev/pty/1 or maybe you can give me anower way to debug code with curses.