Author Topic: Why is that the case?  (Read 5541 times)

Offline zhelunwu

  • Single posting newcomer
  • *
  • Posts: 2
Why is that the case?
« on: October 26, 2013, 06:00:30 am »
After I have toggled two breakpoints in my program and tryna debug,  it just go all the way down and finish the program

Indeed, I have never seen once when it could!!

But dev-cpp works well, I just feel puzzled.
 ??? ??? ???
And here follows the info in debugger:

Building to ensure sources are up-to-date
Selecting target:
Debug

Set variable: PATH=.;D:\Program Files\CodeBlocks\MinGW\bin;D:\Program Files\CodeBlocks\MinGW;C:\Program Files\NVIDIA Corporation\PhysX\Common;D:\Program Files\CodeBlocks\MinGW\libexec\gcc\mingw32\4.7.1;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;D:\CTEX\UserData\miktex\bin;D:\CTEX\MiKTeX\miktex\bin;D:\CTEX\CTeX\ctex\bin;D:\CTEX\CTeX\cct\bin;D:\CTEX\CTeX\ty\bin;D:\CTEX\Ghostscript\gs9.05\bin;D:\CTEX\GSview\gsview;D:\CTEX\WinEdt;C:\Program Files\Windows Kits\8.0\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;D:\Program Files\QuickTime\QTSystem;E:\Program Files\MATLAB\R2013a\runtime\win32;E:\Program Files\MATLAB\R2013a\bin
Starting debugger: D:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args /bin/Debug/hello.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Reading symbols from \Debug\hello.exe...(no debugging symbols found)...done.
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 7772
[Inferior 1 (process 7772) exited normally]
Debugger finished with status 0
« Last Edit: October 26, 2013, 06:07:24 am by zhelunwu »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Why is that the case?
« Reply #1 on: October 26, 2013, 07:38:28 am »
After I have toggled two breakpoints in my program and tryna debug,  it just go all the way down and finish the program
[...]
Reading symbols from \Debug\hello.exe...(no debugging symbols found)...done.
[...]

It looks like you try to debug a release-project.
Make sure the debug switch is set while compiling, if you use MinGW/gcc it's -g .

And please use code-tags, if you post log-output or sources to make it more readable.

Offline zhelunwu

  • Single posting newcomer
  • *
  • Posts: 2
Re: Why is that the case?
« Reply #2 on: October 26, 2013, 08:24:37 am »
Code
#include<iostream>
using namespace std;
int main()
{
    int n = 5;
    cout << "Hello world!"<<endl;
    cout << n << endl;
    return 0;
}

just a test program, but I fail to track anyway, it just go until the last line and no yellow triangle appears

yeah, i mean the breakpoints are not effective
« Last Edit: October 26, 2013, 08:27:29 am by zhelunwu »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Why is that the case?
« Reply #3 on: October 26, 2013, 08:44:35 am »
Why do you ask questions in a forum, if you do not read the answers ?

Reread my previous post, everything you need is written there !

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]