Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 198612 - C++ Step by Step
C++ Step by Step
Status: RESOLVED DUPLICATE of bug 200196
Product: cnd
Classification: Unclassified
Component: Debugger
PC Linux
: P3 (vote)
Assigned To: Egor Ushakov
Depends on:
  Show dependency treegraph
Reported: 2011-05-15 14:34 UTC by mikikiki
Modified: 2011-10-10 08:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description mikikiki 2011-05-15 14:34:05 UTC
Hello :)

Installed NetBeans 7.0 full package. This issue is only in C++ dev. since I checked in in Java and haven’t found this problem there.

The problem: 
I try to go step by step F7 (line by line) in debug mode but it jumps over the lines to the next breakpoint. Sometimes it jumps to next breakpoint and from there it continues as expected line by line. For example:

#include <iostream>
int main(int argc, char**argv)
    // Prints welcome message...
    std::cout << "Welcome ..." << std::endl;

    int i = 5;
    int j = 10;
    std::string s1 = "TEST";
    std::string s2 = "TEST2";
    // Prints arguments...
    if (argc > 1) {
        std::cout << std::endl << "Arguments:" << std::endl;
        for (int i = 1; i < argc; i++) {
            std::cout << i << ": " << argv[i] << std::endl;
    return 0;

Scenarios: (BP=breakpoint)
1) If I put BP on the first line std::out << Welcome... it stops there and the next hit on F7 goes to the end of the program (executes everything)
2) The same as (1) but after the stop on BP I do "run to cursor" and let's assume the cursor now on "int j = 10;". After this hit on F7 will jump to next line as expected and then to the next next next.
Works fine, but this is annoying on every debug to make run to cursor in order to debug step by step.
3) If I put BP on the first line "..cout<< Welcome..." and second BP on "s1="TEST"; it stops on first BP then F7 will jump to next BP (skipping the lines with int i= 5; and int j=10;:-(  ) and then F7 works fine again.

I saw the same problem when I Googled it even in earlier versions but it seems like nobody took care of reporting/treating the bug.


Best Regards,
Comment 1 soldatov 2011-05-16 09:01:45 UTC

*** This bug has been marked as a duplicate of bug 197493 ***
Comment 2 Alexander Pepin 2011-07-06 14:10:34 UTC
Should be added to test scenarios.
Comment 3 soldatov 2011-07-18 09:13:02 UTC
Now I think it is duplicate of 200196 (not a iz197493)
Comment 4 Alexander Pepin 2011-07-18 11:22:00 UTC
Added testStepOverAfterBreakpoint to StepOver gdb test suite.
Comment 5 Egor Ushakov 2011-09-27 12:01:27 UTC
please clarify what OS and gdb version you were using?
looks like the same problem from the bug 200196
Comment 6 Egor Ushakov 2011-10-10 08:11:29 UTC

*** This bug has been marked as a duplicate of bug 200196 ***

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