test code notation with break
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- ruby
- 領域
- devtools, testing-qa
研究方向
Start by reviewing the existing debug_code test framework usage and the two proposed notations: comments on source lines or markers beside line numbers. Compare both with the existing break commands and debugger method, then define how tests should translate the chosen notation into breakpoints and how completion will be verified.
由索引模型根據 Issue 內容生成。
描述
Just idea.
Now we need to set breakpoints with break commands on tests like:
def program
<<~RUBY
1| def foo a
2| b = a + 1 # break
3| end
4| x = 1 # break
5| x = 2
6| x = 3
RUBY
end
def test_foobar
debug_code program do
type 'break 2'
type 'break 4'
On this code, line 2 and 4 is breakpont, and using 2 break commands. On the other hands, if we use IDE we can set breakpoints on a code (with editor's support). So we can write breakpoints on the code.
IDEA1: Use comment on the line.
<<~RUBY
1| def foo a
2| b = a + 1 # break
3| end
4| x = 1 # break
5| x = 2
6| x = 3
RUBY
and issues two break commands by the test framework.
IDEA2: Check on the left of line number:
<<~RUBY
1| def foo a
*2| b = a + 1
3| end
*4| x = 1
5| x = 2
6| x = 3
RUBY
and issues two break commands by the test framework.
Of course we can write debugger method, but it can be different from normal break points, so it should be supported separately.
- 主要語言
- Ruby
- 星號
- 1.3k
- 分支
- 146
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ruby/debug 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP 未關閉
難度 4/5 3-5 天 新手友好度 55/100
-
難度 3/5 1-2 天 新手友好度 45/100
-
難度 4/5 3-5 天 新手友好度 52/100
-
難度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
palladius/rails8-app-on-gcp#145 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
難度 2/5 1-3 小時 新手友好度 70/100
riscv/riscv-unified-db#2624 · 1 個 reaction ·
-
難度 1/5 1 小時以內 新手友好度 88/100