ruby1.9 - require "debug" and output when stdout is not a terminal?

M

Marc Weber

Try this:

cat >> test.rb << EOF
require "debug"
a = 10
a = 10
a = 10
a = 10
EOF


Then run it this way:

ruby test.rb | cat

now when the debug prompt pops up type
p "dummy"

and dummy is printed after leaving the debug prompt.
Is there a way to make it behave the ruby-1.8 way - print it instantly?

I used this kind of output in Vim REPL completion.

Yes - I know I should implement kind of true debugger interface...

Marc Weber
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top