[Rails] Re: breakpoint not working
Florian Groß
florgro at gmail.com
Sat Jan 29 13:46:00 GMT 2005
Scott Barron wrote:
>>>> I think there might be something funny going on with remote
>>>> breakpointing in 0.9.5. I'm getting that same output on the
>>>> console, and when I insert a breakpoint in the app I get:
>>>>
>>>> SecurityError (Insecure operation `write' at level 4)
>>> Not able to reproduce that here. Can you please provide detailed
>>> information so I can try to trace it up? It would be helpful to know
>>> what platform you're on, what dispatching type (CGI, FastCGI,
>>> ModRuby), web server you use and whether the bug shows up reliably or
>>> just every once and then.
>>>
>> Sure thing, Rails 0.9.5, Ruby 1.8.1, OS X, using webrick, and it shows
>> up reliably, using breakpoint from any action. Anything else you need?
>>
> I should also note that the breakpoints work fine while running unit
> tests, it's only when using it through webrick. I have not tested it
> with apache.
Does the problem still occur when you use something else instead of
WEBrick? I think I've traced this whole thing to the handlers being run
in a $SAFE=4 context so far. But I don't know why such a thing would happen.
Perhaps you can also try putting this code in one of your controller
files: (at top level, outside of Classes and defs)
File.open("/tmp/debug.log") { |f| trace_var(:$SAFE) { |*args|
f.puts(args.inspect) } }
It will log changes of $SAFE into /tmp/debug.log which might give a hint
as to what is happening. But then again I've pretty much greped through
Ruby's standard library and the Rails code and not seen any place where
$SAFE would be changed like that.
I'm also wondering if this bug might be only happening on OS X and/or
WEBrick and/or Ruby 1.8.1.
More information about the Rails
mailing list