This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hello All Now I can install breakpoints on "end" or "def" keyword in Ruby editor, but debugger pass these breakpoints. Can you extend debugger functionality and stop debugger on that keywords. I think that it feature will be a very helpful for Ruby and Rails developers. Thanks
The debugger stops at the 'def' definitions. But it stops there just first time when the class/module itself is interpreted, e.g.: class A def hey # breakpoint here puts 'hey' end end A.new.hey When you put breakpoint on 'def hey' line and start to debug the application, debugger stops there. Or do you mean the "Function Breakpoint". I.e. each time method is called the debugger would stop there? Would behave as if you put the breakpoint on the "puts 'hey'" line?
> "end" And by 'end' you mean to stop each time, method is being left?
Sorry, I was wrong about "def" keyword. >And by 'end' you mean to stop each time, method is being left? Yes, you are right. For example I has following method: def index @messages = Message.page(params[:page]) end And I want to see @messages at "Watch" window. At this case I can't do that because when I toggle break point on "end" keyword the debugger pass it. Now I do following "hack": def index @messages = Message.page(params[:page]) i = 0 end and toggle breakpoint on "i = 0" string. And all my code in "debug time" has "i = 0" string, I think that it is not right and debugger should stop on "end" keyword. That do you think about that idea? Thanks
Created attachment 67543 [details] Breakpoint on end } in VS 2008
For example Visual Studio IDE can stop debugger on end '}' (see picture in attach)
Your example is clear, thansk. However this depends rather on the debugger backend, and might be on interpreter itself. I know that MRI ruby-debug-base offer this possibility, jruby-debug-base not yet. Will have to check this there firstly. (setting TM -> FUTURE, we are after feature freeze for 6.5)