![](/img/trans.png)
[英]In Ruby debug, only step through application/project files and skip framework files?
[英]Is it possible to step through a RoR application? or only debug using the debugging breakpoint?
我讀到你可以在你的RoR代碼中加上一個'調試'符號,然后執行將在那時停止,然后你可以將任何東西吐出到控制台中以查看變量的狀態等。
有沒有辦法逐步執行每一行並遵循執行路徑?
調試器本身有文檔。 n
和s
是您要查找的命令。
(rdb:1) help
ruby-debug help v0.10.3
Type 'help <command-name>' for help on a specific command
Available commands:
backtrace delete enable help next quit show trace
break disable eval info p reload source undisplay
catch display exit irb pp restart step up
condition down finish list ps save thread var
continue edit frame method putl set tmate where
(rdb:1) help next
n[ext][+-]?[ nnn] step over once or nnn times,
'+' forces to move to another line.
'-' is the opposite of '+' and disables the force_stepping setting.
(rdb:1) help step
s[tep][+-]?[ nnn] step (into methods) once or nnn times
'+' forces to move to another line.
'-' is the opposite of '+' and disables the force_stepping setting.
(rdb:1)
這個Railscast劇集也有一些關於ruby-debug的提示。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.