This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139817 - Rake debugging cannot see @ or @@ variables in Local Variable List
Summary: Rake debugging cannot see @ or @@ variables in Local Variable List
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-13 20:56 UTC by esmithbss
Modified: 2011-01-28 20:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot documenting the issue. (99.50 KB, text/plain)
2008-07-16 03:55 UTC, esmithbss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2008-07-13 20:56:10 UTC
When debugging a rake task, the @<name> and @@<name> variables are not shown in the variable examination tab (Local
variables).

These variables need to be visible for full debugging.  Either as part of "Global Variables" object, or as part of their
own hierarchy.
Comment 1 Martin Krauskopf 2008-07-15 09:18:38 UTC
They are shown as instance variable and class variables for the object instance. If you define such variables on top
level, like:

  require 'rubygems'
  require 'rake'
  require 'rake/testtask'

  @a = 'hi there'
  @@aa = 'hello there'

  desc "Default Task (test)"
  task :default => [ :test ]

They 'belong' to the self object which is not show on the top-level. Otherwise you should see them always. Please reopen
if you don't.
You might also add 'self' to the Watches if you want to watch the 'self' on top-level.
Comment 2 esmithbss 2008-07-16 03:54:58 UTC
The problem is that when debugging rake tasks, you may be debugging code that has been provided by external parties
where the @<name> or @@<name> variables are not defined a the top of the file, but instead follow the Ruby DRY principal
and are defined upon first use.

In the attached screenshot, you can see me in the process of debugging "rake db:fixtures:load" from the
fixture_scenarios plugin.

The variable @fixture_paths is a valid array with proper values in it; however, as you can see, the self object has no
knowledge of the variable.
Comment 3 esmithbss 2008-07-16 03:55:42 UTC
Created attachment 64638 [details]
Screenshot documenting the issue.
Comment 4 Martin Krauskopf 2008-07-16 07:13:52 UTC
I though it happens only on top frame on the stack. Clear now. Thanks.
Likely bug in the backends, will investigate.
Comment 5 Quality Engineering 2008-07-28 15:31:25 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #351 build
Changeset: http://hg.netbeans.org/main/rev/f4d5e03a985d
User: Erno Mononen <emononen@netbeans.org>
Log: #139817: "Access Database using JDBC" is partly visible
Comment 6 Erno Mononen 2008-07-29 14:10:15 UTC
desc6 should go to issue 139187, put wrong issue number to the commit msg.