Open ko1 opened 2 years ago
We can enhance this idea for normal Ruby programming by parsing the source code (with IDEA 1), but it's too much and almost case debugger
method is enough. The difference between break
command and debugger
method is we can control (add/delete) breakpoints added by break
commands (we can not delete deubgger
method on a running process).
I like the IDEA 1 better but only for debugger tests. I think putting breakpoint comment in the code will cause more trouble than convenience. For example: users may need to exit other people's breakpoint comments before entering the one they set.
Just idea.
Now we need to set breakpoints with
break
commands on tests like: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.
and issues two break commands by the test framework.
IDEA2: Check on the left of line number:
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.