News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Why is that the case?

Started by zhelunwu, October 26, 2013, 06:00:30 AM

Previous topic - Next topic

zhelunwu

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

Jenna

Quote from: zhelunwu 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
[...]
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.

zhelunwu

#2

#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

Jenna

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 !

oBFusCATed

(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!]