Debugger breakpoints work?

Back in Feb & Apr 2003 there was some ruby-talk regarding
breakpoints not getting set properly, being set but not being
"broken" at, problems with exactly how the breakpoint should
be specified, etc.

I'm just now learning Ruby, making my way through the
Pickaxe II book, and yesterday I got to the section on
using the debugger. I was surprised to find that you
can set a breakpoint on a non-executable line (without
causing an error from the debugger) and that execution
does NOT stop at the next line after the breakpoint.

I believe that with every debugger I've used in the past
15 years (probably 8 or 9 of them) has moved the break-
point to the next executable line when you try to break
on a comment. Does it strike anyone else as odd that
Ruby's debugger doesn't do this?

Todd.

Ohmigod! That would have never occurred to me in a million years. Actually, the norm i've experienced is that, if it can't set the breakpoint where you wanted it, it either tells you it couldn't set it or tells you that it set it on another line, instead. I'm not sure exactly how you'd precisely define what an executable line is. But i just tried setting a break on
.../active_record/connection_adapters/postgresql_adapter.rb, lines 36, 37 & 38 and, still, no break occurs.

36: ConnectionAdapters::PostgreSQLAdapter.new(
37: PGconn.connect(host, port, "", "", database, username, password), logger
38: )

Yet WEBrick/Rails still responds with:

···

-----------------------------------------------
PGError in Album#index

FATAL: IDENT authentication failed for user "postgres"

/usr/lib/ruby/gems/1.8/gems/activerecord-1.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `connect'
. . . [lots more stack trace] . . .
-----------------------------------------------

Bradley, Todd wrote:

Back in Feb & Apr 2003 there was some ruby-talk regarding breakpoints not getting set properly, being set but not being "broken" at, problems with exactly how the breakpoint should be specified, etc.
   
I'm just now learning Ruby, making my way through the
Pickaxe II book, and yesterday I got to the section on
using the debugger. I was surprised to find that you
can set a breakpoint on a non-executable line (without
causing an error from the debugger) and that execution
does NOT stop at the next line after the breakpoint.

I believe that with every debugger I've used in the past 15 years (probably 8 or 9 of them) has moved the break-
point to the next executable line when you try to break
on a comment. Does it strike anyone else as odd that
Ruby's debugger doesn't do this?

Todd.

I believe that with every debugger I've used in the past
15 years (probably 8 or 9 of them) has moved the break-
point to the next executable line when you try to break
on a comment. Does it strike anyone else as odd that
Ruby's debugger doesn't do this?

I would guess you mean debugger for compiled languages not script
languages here. Right ? The debugging model of script languges is much
different. If is no real problem to find the next line of code in
machine code (COFF or ELF binary) but it is currently in script languages.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's