pry gem 跟 bug say bye

Gary Huang
Dublin so code
Published in
1 min readOct 8, 2020
老地方觀機平台

JS 開發者經常會使用 console.log 來 debug,然而 Rails 開發者卻要 puts 參數利用 log 查看,相當不方便。使用 pry gem 可以即時攔截程式碼的送出的請求,直接查看參數值。除了大家常用的 binding.pry 之外,也可以進入 Pry 的 shell 中操作 console,詳細說明可以參考這兩篇文章:

  1. 即時除錯
  2. 新一代 Debug 利器

祝福大家除蟲順利XD

--

--

Gary Huang
Dublin so code

Self-taught in programming, currently working as a web developer and also a online course instructor, helping self-taught programmers find employment.