Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 115913 - Debugger in Netbeans can not display pointer as array
Debugger in Netbeans can not display pointer as array
Status: NEW
Product: cnd
Classification: Unclassified
Component: Debugger
6.x
All All
: P3 with 2 votes (vote)
: 7.0
Assigned To: Maria Tishkova
issues@cnd
:
: 192115 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo