I am trying to debug some Capybara integration tests and run into an unforeseen problem. When I set a breakpoint in the Capybara test, I can check the variables, but I can't call puts or $stdout.puts or $stderr.puts . To understand what I mean, look at this conclusion:
(rdb:1) "foo" "foo" (rdb:1) puts "foo" nil
Presumably this is due to the fact that Capybara commits both stderr and stdout as part of the standard operation to keep calm with selenium drivers, etc. I understand, but the problem is that checking the lines in the ruby ββdebugger escapes new lines, which makes it impossible to read long formatted lines, such as HTML.
How can I get a link to the active terminal to output something for debugging purposes using IO#puts ?
source share