title: How to enable remote debugging with headless chrome when using ruby and selenium?
body: <p>When I set the option "--remote-debugging-port", it will throw an error. And without this option, it can work properly. However, I want to debug when using the headless chrome. How can I do ?</p>
  
  <p>.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/protocol.rb:158:in `rescue in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)</p>
  
  <p>Here is my code:</p>
  
  <pre><code>options = Selenium::WebDriver::Chrome::Options.new
  options.add_argument('--headless')
  options.add_argument('--disable-gpu')
  options.add_argument('--remote-debugging-port') # debug
  @driver = Selenium::WebDriver.for(:chrome, options: options)
  puts @driver.manage.logs.get :browser
  </code></pre>