BigW Consortium Gitlab

live_debugger.rb 467 Bytes
Newer Older
1 2 3 4
require 'io/console'

module LiveDebugger
  def live_debug
5 6
    puts
    puts "Current example is paused for live debugging."
7
    puts "Opening #{current_url} in your default browser..."
8
    puts "The current user credentials are: #{@current_user.username} / #{@current_user.password}" if @current_user
9
    puts "Press any key to resume the execution of the example!!"
10

11 12
    `open #{current_url}`

13
    loop until $stdin.getch
14

15 16 17
    puts "Back to the example!"
  end
end