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 115913 - Debugger in Netbeans can not display pointer as array
Summary: Debugger in Netbeans can not display pointer as array
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Maria Tishkova
URL:
Keywords:
: 192115 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-18 21:02 UTC by soldatov
Modified: 2016-07-06 14:38 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2007-09-18 21:02:32 UTC
In Eclipse debugger can display pointer as array. It is very useful feature but C/C++ Pack have not analogue.
For example It can work in Netbeans in such a way:
- Load this program to debugger:
int main() {
    int* p;
    p = new int(5);
    p[0] = 0;
    p[1] = 1;
    p[2] = 2;
    p[3] = 3;
    p[4] = 4;
    return 0;
}
- Set line breakpoint on "return 0;" string
- Go to this line
- Open 'Local Variables' tab
- Select 'p' in tab and call context menu. Select 'display as array' menu item
==> dialog window appears
- Set size of array
==> 'Local Variables' tab contains such strings:
  p       (int*)0x111111
    p[0]  0
    p[1]  1
    p[2]  2
    p[3]  3
    p[4]  4
Comment 1 kandel3 2012-03-18 23:22:13 UTC
Has anybody solved this? I am using 7.0.1 and I can't figure out how to display an array!
(In reply to comment #0)
> In Eclipse debugger can display pointer as array. It is very useful feature but
> C/C++ Pack have not analogue.
> For example It can work in Netbeans in such a way:
> - Load this program to debugger:
> int main() {
>     int* p;
>     p = new int(5);
>     p[0] = 0;
>     p[1] = 1;
>     p[2] = 2;
>     p[3] = 3;
>     p[4] = 4;
>     return 0;
> }
> - Set line breakpoint on "return 0;" string
> - Go to this line
> - Open 'Local Variables' tab
> - Select 'p' in tab and call context menu. Select 'display as array' menu item
> ==> dialog window appears
> - Set size of array
> ==> 'Local Variables' tab contains such strings:
>   p       (int*)0x111111
>     p[0]  0
>     p[1]  1
>     p[2]  2
>     p[3]  3
>     p[4]  4
Comment 2 soldatov 2012-03-19 07:51:44 UTC
Workaround: add "*p@5" string into Variables tab
Comment 3 Egor Ushakov 2012-04-19 13:20:08 UTC
*** Bug 192115 has been marked as a duplicate of this bug. ***