test code notation with break
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- devtools, testing-qa
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Ruby
- Stars
- 1.3k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/debug
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·