| View previous topic :: View next topic |
| Author |
Message |
bkocik
Joined: 03 Oct 2008 Posts: 19
|
Posted: Sun Jun 14, 2009 7:18 pm Post subject: NB6.7RC2 and Rails debugging |
|
|
I've been forced to deal with developing Rails apps on Windows for a while now, and since I have to run them in Cygwin I've been unable to debug them with NetBeans (which runs outside of Cygwin). I'm trying to use the new remote debugging stuff in NB6.7RC2 to remedy this, and I'm having some trouble getting started.
In Cygwin, I do this:
[15:02][wkocik]>$ rdebug-ide -p 7000 -- script/server webrick
Fast Debugger (ruby-debug-ide 0.4.6) listens on localhost:7000
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-06-14 15:05:11] INFO WEBrick 1.3.1
[2009-06-14 15:05:11] INFO ruby 1.8.7 (2008-08-11) [i386-cygwin]
[2009-06-14 15:05:11] INFO WEBrick::HTTPServer#start: pid=18428 port=3000
I attach the NetBeans remote debugger to localhost on port 7000, specifying ruby-debug-ide as the type. Then I set a breakpoint in my main controller's index method (within NB), and hit localhost:3000 with my web browser. The request completes - the breakpoint is ignored.
Am I doing something wrong here? I'm not sure how to troubleshoot this. No breakpoints I set are being obeyed, the app just flies right by them.
I'm certain the server and NetBeans are using the same codebase, because I start the server inside the same directory NB is looking at for the project. Also, when I hit the "End debugging session" button in NB, the process I started on the command line exits, so I'm sure NB is talking to the debugger.
Any ideas? |
|
| Back to top |
|
 |
Erno Mononen Posted via mailing list.
|
Posted: Mon Jun 15, 2009 8:00 am Post subject: NB6.7RC2 and Rails debugging |
|
|
Hi Bill,
I know there are similar problems with the debugger when the project dir
uses extended attributes (on OS X) or when it is located on a Win
partition and the IDE is running under Linux. Maybe somehow twiddling
with the file attributes could help, but I don't know what exactly you
should do. Is there anyone here who can debug an app running under Cygwin?
Erno
bkocik wrote:
| Quote: | I've been forced to deal with developing Rails apps on Windows for a while now, and since I have to run them in Cygwin I've been unable to debug them with NetBeans (which runs outside of Cygwin). I'm trying to use the new remote debugging stuff in NB6.7RC2 to remedy this, and I'm having some trouble getting started.
In Cygwin, I do this:
[15:02][wkocik]>$ rdebug-ide -p 7000 -- script/server webrick
Fast Debugger (ruby-debug-ide 0.4.6) listens on localhost:7000
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-06-14 15:05:11] INFO WEBrick 1.3.1
[2009-06-14 15:05:11] INFO ruby 1.8.7 (2008-08-11) [i386-cygwin]
[2009-06-14 15:05:11] INFO WEBrick::HTTPServer#start: pid=18428 port=3000
I attach the NetBeans remote debugger to localhost on port 7000, specifying ruby-debug-ide as the type. Then I set a breakpoint in my main controller's index method (within NB), and hit localhost:3000 with my web browser. The request completes - the breakpoint is ignored.
Am I doing something wrong here? I'm not sure how to troubleshoot this. No breakpoints I set are being obeyed, the app just flies right by them.
I'm certain the server and NetBeans are using the same codebase, because I start the server inside the same directory NB is looking at for the project. Also, when I hit the "End debugging session" button in NB, the process I started on the command line exits, so I'm sure NB is talking to the debugger.
Any ideas?
|
|
|
| Back to top |
|
 |
bkocik
Joined: 03 Oct 2008 Posts: 19
|
Posted: Fri Sep 11, 2009 9:15 pm Post subject: |
|
|
| Just curious - has anyone ever figured this out? By now I've updated to the released version (6.7.1), and the behavior is exactly the same. NB is definitely talking to ruby-debug-ide, but breakpoints seem to have no effect. |
|
| Back to top |
|
 |
bkocik
Joined: 03 Oct 2008 Posts: 19
|
|
| Back to top |
|
 |
Erno Mononen Posted via mailing list.
|
Posted: Tue Sep 15, 2009 2:33 pm Post subject: NB6.7RC2 and Rails debugging |
|
|
Hello,
Unfortunately I don't know a solution for this (if twiddling with the
file attributes doesn't help). I suppose breakpoints don't work from the
command line either
(http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-CheckingDebuggerEngineFunctionality)?
In case do work, we should be able to make them work in NB too.
Cheers,
Erno
bkocik wrote:
|
|
| Back to top |
|
 |
bkocik
Joined: 03 Oct 2008 Posts: 19
|
Posted: Tue Sep 15, 2009 3:52 pm Post subject: NB6.7RC2 and Rails debugging |
|
|
On Tue, Sep 15, 2009 at 10:32 AM, Erno Mononen <address-removed> wrote:
| Quote: | Hello,
Unfortunately I don't know a solution for this (if twiddling with the file
attributes doesn't help).
|
I'm not sure which attributes to toy with on Windows.
| Quote: | I suppose breakpoints don't work from the command
line either
(http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-CheckingDebuggerEngineFunctionality)?
|
Actually it does. :)
I'll try running NB with debugger debugging and see what comes of it.
--
Bill Kocik
http://bkocik.net |
|
| Back to top |
|
 |
mark-moseley
Joined: 18 Sep 2009 Posts: 5
|
Posted: Fri Sep 18, 2009 5:55 pm Post subject: Re: NB6.7RC2 and Rails debugging |
|
|
I had this exact problem when I was porting ruby-debug from 1.8 to 1.9. What was happening, was a new thread was created to process the controllers after the breakpoint was set. ruby-debug wasn't hooking the new thread, so nothing happened.
This is fixed in ruby-debug19. If running Ruby 1.9.x is an option, give it a try. |
|
| Back to top |
|
 |
|