ruby好不容易升級到了2.4.0
用的編輯器是vscode 1.9
gem安裝了 debug-ide 可是為什麼我在code中debug還是報錯。
就一句puts 123。不至於吧
貼上報錯代碼
/Users/jason/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
/Users/jason/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'
/Users/jason/.rvm/gems/ruby-2.4.0/gems/ruby-debug-ide-0.6.1.beta3/lib/ruby-debug-ide.rb:91:in `debug_load': cannot load such file -- /Users/jason/Downloads/Study/main.rb (LoadError)
from /Users/jason/.rvm/gems/ruby-2.4.0/gems/ruby-debug-ide-0.6.1.beta3/lib/ruby-debug-ide.rb:91:in `debug_program'
from /Users/jason/.rvm/gems/ruby-2.4.0/gems/ruby-debug-ide-0.6.1.beta3/bin/rdebug-ide:157:in `<top (required)>'
from /Users/jason/.rvm/gems/ruby-2.4.0/bin/rdebug-ide:22:in `load'
from /Users/jason/.rvm/gems/ruby-2.4.0/bin/rdebug-ide:22:in `<main>'
from /Users/jason/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/jason/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'
Debugger error: Client: Error: read ECONNRESET
求教老司機!
我知道
~哈哈哈結論是工作目錄不對。導致找不到main.rb。 vscode的debug設定檔需要改變工作路徑或開啟到工作目錄