Forum: Ruby on Rails Breakpoints completely fail to work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bee024ad9234098c14cb1ab5b3ea72c8?d=identicon&s=25 Jon Yurek (jyurek)
on 2006-02-16 03:43
I did as I was told: add "breakpoint" to an action, start script/server,
start script/breakpointer, then go to the action in the browser.
Absolutely nothing happens, on either side. I've tried every variation
of starting what when I can think of, I've specified ports, I've done
all I can think of, but never once have I gotten the fabled irb prompt
that should let me debug. Not only that, but webrick completely hangs. I
have to kill -9 it.

It's Rails 1.0, Ruby 1.8.2, Fedore Core 3, irb is installed. I'd really
like to be able to use this, so if anyone has any ideas, I'd love to
hear them.
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-02-16 04:29
(Received via mailing list)
Are you absolutely certain that the breakpoint is getting executed?

I know that's a basic question...but I have a hard time believing
that nothing is happening on either side if it is.

--
-- Tom Mornini
A44d5abad6e86cff4e34d9f0839535c9?d=identicon&s=25 Rick Bradley (Guest)
on 2006-02-16 04:59
(Received via mailing list)
* Jon Yurek (jyurek@thoughtbot.com) [060215 21:45]:
> hear them.
1. Which environment {development, testing, production, [other] ... }
are you running under?  Sounds like development, but just wanted to make
sure.

2. Can you get this to work on a pristine Rails application (i.e,. run a
new "rails foo" and from within foo run "script/breakpointer" and
"script/server")?

3. Following along the line the other poster pointed, can you put a
marker on the line above your "breakpoint" like:

 [...]

 STDERR.puts "I should be hitting the breakpoint NOW!"
 breakpoint

 [...]

and see if you see the marker text printing out?

Rick
--
 http://www.rickbradley.com    MUPRN: 560
                       |  af6159707ab83edefa35d8cc2f0c5f34
   random email haiku  |  Status: RO Hi, I had
                       |  a great spring break.
Bee024ad9234098c14cb1ab5b3ea72c8?d=identicon&s=25 Jon Yurek (jyurek)
on 2006-02-16 17:11
Rick Bradley wrote:
> 1. Which environment are you running under?

Development.

> 2. Can you get this to work on a pristine Rails application?

No, the behavior is the same.

> 3. Following along the line the other poster pointed, can you put a
> marker on the line above your "breakpoint"

The marker does print.

...

Upon further investigation, it seems that it's a DRb problem. I changed
the fresh controller to the following:

class TestController < ApplicationController
    def index
        STDERR.puts "I should be hitting the breakpoint now."
        Breakpoint.deactivate_drb
        breakpoint
    end
end

Webrick gave me the irb prompt. I was able to inspect the environment,
and it worked like it should. This seems odd, since I don't recall
having a problem with DRb in other situations. I'll just stick
Breakpoint.deactivate_drb into my ApplicationController for now (I tried
putting it in environment.rb and it didn't work, in case you were
wondering).
This topic is locked and can not be replied to.