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 
  

Can debug some projects, but not others

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



Joined: 13 Jan 2009
Posts: 7

PostPosted: Tue Jan 13, 2009 9:56 pm    Post subject: Can debug some projects, but not others Reply with quote

I have a frustrating problem, in that I can debug some projects with Netbeans 6.5, but not others. Using Ubuntu 8.10, ruby 1.8.6p111, gems 1.3.1, rails 2.2.2 frozen. I have tried removing the nbproject directory and creating a new project in the IDE, along with removing the ~/.netbeans/6.5 directory.

I have downloaded the production copy of the one I can't debug to its own directory, and then made it a project. It debugs just fine. I'm also quite sure I could debug this project in the past.

The machine I am using dual-boots, and I can debug in windows the same project that will not debug in Linux.

messages log attached.



messages.txt
 Description:
log file

Download
 Filename:  messages.txt
 Filesize:  26.28 KB
 Downloaded:  546 Time(s)

Back to top
View user's profile Send private message
Martin Krauskopf
Posted via mailing list.





PostPosted: Tue Jan 13, 2009 10:07 pm    Post subject: Can debug some projects, but not others Reply with quote

dmoulton wrote:
Quote:
I have a frustrating problem, in that I can debug some projects with Netbeans 6.5, but not others. Using Ubuntu 8.10, ruby 1.8.6p111, gems 1.3.1, rails 2.2.2 frozen. I have tried removing the nbproject directory and creating a new project in the IDE, along with removing the ~/.netbeans/6.5 directory.

I have downloaded the production copy of the one I can't debug to its own directory, and then made it a project. It debugs just fine. I'm also quite sure I could debug this project in the past.

The machine I am using dual-boots, and I can debug in windows the same project that will not debug in Linux.

messages log attached.

Hi, could you provide log with detailed logging turned on as described
at (the one you've attached did not contain details):

6.5:
http://wiki.netbeans.org/RubyDebugging#section-RubyDebugging-HowToFileABug

7.0:
http://wiki.netbeans.org/RubyDebugging70#section-RubyDebugging70-HowToFileABug

I would encourage you to update Ruby to the latest one, 1.8.7-p72 on
Linux. 1.8.6-p111 had some Segmentation Fault issues wrt. to the debugger.

I've also released new version of ruby-debug-ide today, could you
upgrade to the most recent versions, ruby-debug-ide-0.3.4 for 6.5 or
ruby-debug-ide-0.4.4 for 7.0.

Thanks,
m.
Back to top
dmoulton



Joined: 13 Jan 2009
Posts: 7

PostPosted: Tue Jan 13, 2009 10:18 pm    Post subject: Reply with quote

I will upgrade ruby. I have attached a new log file, hopefully what you are looking for. I am already using 0.3.4.


messages2.txt
 Description:

Download
 Filename:  messages2.txt
 Filesize:  46.62 KB
 Downloaded:  192 Time(s)

Back to top
View user's profile Send private message
Martin Krauskopf
Posted via mailing list.





PostPosted: Tue Jan 13, 2009 10:27 pm    Post subject: Can debug some projects, but not others Reply with quote

dmoulton wrote:
Quote:
I will upgrade ruby.

Let me know whether does it help.

Quote:
I have attached a new log file, hopefully what you are looking for.
[...]

Yes, thanks. But did not reveal anything strange. So the problem is that
in the scenario under which you've "created" the log, you've started up
the Rails app. under the debugger and:

1) the Rails application has frozen
2) or just the breakpoint in your api_controller.rb:203 was not hit, but
application runs normally?

You might be encountering the same issue as we are trying to solve with
Ben in:

http://www.netbeans.org/issues/show_bug.cgi?id=156410

Bad that I'm not able to reproduce. Does it have random nature for you
or you are able to reproduce each time with certain project? If so are
you able to stop on the breakpoint in config/boot.rb (if you put it there)?

Thanks,
m.
Back to top
dmoulton



Joined: 13 Jan 2009
Posts: 7

PostPosted: Tue Jan 13, 2009 10:36 pm    Post subject: Reply with quote

I have the same problem. The app runs as if there were no breakpoints. It executes fine.

I remember now why I am using 1.8.6. I have another project that is old and needs rails 1.2.6 for now. I was having this same exact problem with it, and downgrading to 1.8.6 fixed it. It will be interesting to see if re-upgrading breaks the other project.
Back to top
View user's profile Send private message
Martin Krauskopf
Posted via mailing list.





PostPosted: Tue Jan 13, 2009 10:43 pm    Post subject: Can debug some projects, but not others Reply with quote

dmoulton wrote:
Quote:
I have the same problem. The app runs as if there were no breakpoints. It executes fine.

So the debugger just ignores breakpoint, no any Rails freezes?

What about putting breakpoint into $rails_app/config/boot.rb, e.g. on
line (4th in fresh Rails app):

RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unl.......

Does NetBeans stop there if you put there a breakpoint? Just to
double-check it is the same problem.

m.
Back to top
dmoulton



Joined: 13 Jan 2009
Posts: 7

PostPosted: Tue Jan 13, 2009 10:58 pm    Post subject: Reply with quote

Interesting.

I had begun upgrading to 1.8.7 by the time I read your message. It had no effect. Still no stop on that line.

But, it does stop on the line in boot.rb when I put a bp there.
Back to top
View user's profile Send private message
Martin Krauskopf
Posted via mailing list.





PostPosted: Tue Jan 13, 2009 11:16 pm    Post subject: Can debug some projects, but not others Reply with quote

dmoulton wrote:
Quote:
Interesting.

I had begun upgrading to 1.8.7 by the time I read your message. It had no effect. Still no stop on that line.

But, it does stop on the line in boot.rb when I put a bp there.

So, yes, the same issue. You might CC yourself to the mentioned issue:

http://www.netbeans.org/issues/show_bug.cgi?id=156410

The problem is that seemingly the tracing stops to works somewhere in
the beginning of Rails start-up and/or might be backend or the debugger
thread silently dies.

The last I've wrote to Ben is:

=====================
Also I've noticed that the last tracked line in the -x trace you've sent
me was:

trace:
location="/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:159",
threadId=1

So opening the file (Menu -> File -> Open File, or similarly on Mac):

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb

in NetBeans and putting breakpoint on line 159 which should be the
'raise' line:

151 def require(file, *extras) #:nodoc:
152 if Dependencies.load?
153 Dependencies.new_constants_in(Object) { super }
154 else
155 super
156 end
157 rescue Exception => exception # errors from required file
158 exception.blame_file! file
159 raise
160 end

should stop the debugger in NetBeans after you start to debug RoR
application. Does it? It will stop several times like during requiring
non-must-haves like 'fcgi' and 'thin', but might be that it fails last
time. Just random (might be useless) idea which might bring us closer....
=====================

I'm waiting for his reply. If you want to help with lurking it is
definitely welcomed. It's already "tomorrow" here, so I'm slowly getting
to take some sleep ;)

Thanks for the feedback, hopefully we will find the culprit. Also might
be related to Rails 2.2.2 in some way.

m.
Back to top
dmoulton



Joined: 13 Jan 2009
Posts: 7

PostPosted: Tue Jan 13, 2009 11:25 pm    Post subject: Reply with quote

I appreciate your help. I will probably join in on that conversation. Also, I will go to rails 2.0.2 to see if that changes anything.
Back to top
View user's profile Send private message
dmoulton



Joined: 13 Jan 2009
Posts: 7

PostPosted: Wed Feb 11, 2009 10:07 pm    Post subject: SOLVED Reply with quote

Just a note to anyone who might come across this in the future. I solved this problem by moving my project from the XP partition on my dual boot system to the linux partition. Not a move, but rather a re-checkout from svn. Works fine now.
Back to top
View user's profile Send private message
Erno Mononen
Posted via mailing list.





PostPosted: Thu Feb 12, 2009 8:49 am    Post subject: Can debug some projects, but not others Reply with quote

dmoulton wrote:
Quote:
Just a note to anyone who might come across this in the future. I solved this problem by moving my project from the XP partition on my dual boot system to the linux partition. Not a move, but rather a re-checkout from svn. Works fine now.


That's good info, thanks for sharing it! I'll add this to the
troubleshooting section in the Wiki.

Erno
Back to top
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