Netbeans doesn’t stop on breakpoints while debugging a RoR (Ruby on Rail) app

I recently switched to a different computer and got all gems in the system updated approximately at the same time. Not sure what exactly lead to the problem, but debugging the app in NetBeans became impossible because it stopped stopping on breakpoints. To add some confusion, breakpoints were still working in tests, as I discovered later, just not when I was doing something in Firefox. I tried all recipes including

  • Upgrading Netbeans to the most recent version supporting RoR (Netbeans sropped Ruby support and the latest version still supporting it is 6.0.1)
  • Checking the extended attributes of all folders. Apparently in MacOS if the project folder has an extended attribute NetBeans can’t debug it. Every time you use “extended” HFS+ features like changing background color of a directory in Finder MacOS adds an “extended” attribute to that folder. You can see it but running “ls -l” and noticing “@” character in the file permissions.
  • checking if rdebug is running fine. I used telnet and wireshark to see the communications between rdebug and NetBeans and saw all breakpoints set properly.

So nothing helped until …


… I added debugger call in the code. That debugger line (<%debugger %>) seemed to kick-off the debugging process, I didn’t even need to restart the NetBeans. Leter I removed the debugger line, but the breakpoints kept working. Unfortunately I didn’t have time to finish digging in the NetBeans brains and figure out exactly what’s going on in it, just hope this little trick will save you an hour or two.

Leave a Reply