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.

Bug 155900 - Breakpoint in before_filter doesn't work. Unable to debug before_filter chain.
Summary: Breakpoint in before_filter doesn't work. Unable to debug before_filter chain.
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-21 11:01 UTC by esmithbss
Modified: 2011-01-28 20:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2008-12-21 11:01:39 UTC
I have a before_filter set up in my application.rb so I can check authorizations prior to any request being processed. 
I can place a breakpoint in the code, but when I try to debug my application, the application never breaks, but instead
continues to execute through the before_filter chain.

My application is currently using Rails 2.1.2 and Ruby 1.8.7

Steps to reproduce:

1) Create a simple ROR hello-world project
2) Create a resource called "test"
3) Add an index method to test
4) Create an index view for test
5) Add the following to application.rb

     before_filter :break_in_here

     def break_in_here
        assign_breakpoint_here = 5
        should_have_broken_on_previous_line = 10
        p assign_breakpoint_here * should_have_broken_on_previous_line
     end

6) Place the breakpoint on the first line of the "break_in_here" action
7) Add the following to routes.rb
    map.connect '/', :controller => 'test', :action => 'index'

8) Debug the program.

At this point on my system, the program runs through the complete index action and displays the web page.  It should
instead, break at the specified location in application.rb
Comment 1 Martin Krauskopf 2008-12-22 20:21:14 UTC
Thanks for the detailed steps. Will try to look at it into 7.0.