2022 年 10 月 - 如何在 Ruby 裡面除錯 === https://bit.ly/3TB6Jjs  靜態型別的語言 需要 debug 工具的原因 變數被改變 https://github.com/rom-rb/rom-sql/issues/389 ```ruby= trace = TracePoint.new(:return) do |tp| pp [tp, tp.path, tp.method_id] tp.binding.pry if tp.path.include?('commands/create.rb') end trace.enable { UserRepository.new.create(name: 'Aotoki') ``` https://ruby-doc.org/core-2.5.1/Binding.html binding 是 private method https://github.com/ruby/debug https://st0012.dev/from-byebug-to-ruby-debug https://github.com/ViewComponent/view_component/pull/1536 找到中間出錯的變化 key word: i、bt
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up