FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NB6.7RC2 and Rails debugging

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
bkocik



Joined: 03 Oct 2008
Posts: 19

PostPosted: Sun Jun 14, 2009 7:18 pm    Post subject: NB6.7RC2 and Rails debugging Reply with 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
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Mon Jun 15, 2009 8:00 am    Post subject: NB6.7RC2 and Rails debugging Reply with quote

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

PostPosted: Fri Sep 11, 2009 9:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
bkocik



Joined: 03 Oct 2008
Posts: 19

PostPosted: Fri Sep 11, 2009 9:27 pm    Post subject: Reply with quote

Sorry everyone - I forgot these forum posts go to a mailing list, and context got lost. For those on the list, I was referring to this:

http://forums.netbeans.org/viewtopic.php?p=48157
Back to top
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Tue Sep 15, 2009 2:33 pm    Post subject: NB6.7RC2 and Rails debugging Reply with quote

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:
Quote:
Sorry everyone - I forgot these forum posts go to a mailing list, and context got lost. For those on the list, I was referring to this:



http://forums.netbeans.org/viewtopic.php?p=48157











Back to top
bkocik



Joined: 03 Oct 2008
Posts: 19

PostPosted: Tue Sep 15, 2009 3:52 pm    Post subject: NB6.7RC2 and Rails debugging Reply with quote

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
View user's profile Send private message
mark-moseley



Joined: 18 Sep 2009
Posts: 5

PostPosted: Fri Sep 18, 2009 5:55 pm    Post subject: Re: NB6.7RC2 and Rails debugging Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB