Breakpoints completely fail to work


#1

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.


#2

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 M.


#3
  • Jon Yurek (removed_email_address@domain.invalid) [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.


#4

Rick B. wrote:

  1. Which environment are you running under?

Development.

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

No, the behavior is the same.

  1. 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).