User forums > Using Code::Blocks

debugger not stopping at breakpoint


anmol goel:
Hello I am newbie programmer and i am facing problems using debugger (i am using a debugger for the first time). the problem i was facing was that the debugger was running in some codes and was popping up a issue in the others  - not able to find 'target exec' . So I reinstalled codeblocks now it is not working properly in any now the debugger runs but it doesn't stop on the breakpoints.

this is the code. the breakpoint is in the 14th line (    cout<<"How much money you want to pay"<<endl;)

--- Code: ---#include <iostream>
#include <stdlib.h>
#include <algorithm>

using namespace std;

int start,a,denomination[15],money,rem=10,notes,temp;
char waste;

int main()

    cout<<"How much money you want to pay"<<endl;

    cout << "How many denomination of notes you have" << endl;
    cin >> a;

        cout<<"Invalid input"<<endl;
        cout<<"Enter any key"<<endl;

        goto x;

    cout<<"Enter the denominations you have: "<<endl;

    for(int b =0;b<a;b++){
         int y=b+1;
         cout<<": ";

    int temp_1;

    for(int l =0;l<a-1;l++){
        for(int m=l+1;m<a;m++){

    int temp_2=0;

    cout<<"Min notes required: "<<endl;

    for(int e=0 ; e<a && rem!=0; e++){
             notes =money/denomination[e];

             cout<<": ";

    if(!temp_2)cout<<"0 " ;
    return 0;

--- End code ---

and i think this is the debug log

--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Adding source dir: D:\Projects\c++\Denomination\
Adding source dir: D:\Projects\c++\Denomination\
Adding file: D:\Projects\c++\Denomination\bin\Release\denomination.exe
Changing directory to: D:/Projects/c++/Denomination/.
Set variable: PATH=.;C:\MinGW\bin;C:\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\anmol goel\AppData\Local\Microsoft\WindowsApps;C:\Users\anmol goel\AppData\Local\Programs\Microsoft VS Code\bin

[debug]Command-line: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args D:/Projects/c++/Denomination/bin/Release/denomination.exe
[debug]Working dir : D:\Projects\c++\Denomination

Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args D:/Projects/c++/Denomination/bin/Release/denomination.exe

[debug]Reading symbols from D:/Projects/c++/Denomination/bin/Release/denomination.exe...(no debugging symbols found)...done.
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]> show version

Reading symbols from D:/Projects/c++/Denomination/bin/Release/denomination.exe...(no debugging symbols found)...done.

[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]Find the GDB manual and other documentation resources online at:
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 8.1

[debug]> set width 0
[debug]> set height 0
[debug]> set breakpoint pending on
[debug]> set print asm-demangle on
[debug]> set unwindonsignal on
[debug]> set print elements 200
[debug]> set new-console on
[debug]> set disassembly-flavor att
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]> directory D:/Projects/c++/Denomination/
[debug]Source directories searched: D:/Projects/c++/Denomination;$cdir;$cwd
[debug]> break "D:/Projects/c++/Denomination/main.cpp:14"
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Breakpoint 2 ("D:/Projects/c++/Denomination/main.cpp:14") pending.
[debug]> run
[debug]Starting program: D:\Projects\c++\Denomination\bin\Release\denomination.exe

Child process PID: 26608

[debug][New Thread 26608.0x54ec]
[debug][New Thread 26608.0x4e78]
[debug][New Thread 26608.0x6978]
[debug][New Thread 26608.0x2f24]
[debug][New Thread 26608.0x2d14]
[debug][Thread 26608.0x2f24 exited with code 3221225786]
[debug][Thread 26608.0x6978 exited with code 3221225786]
[debug][Thread 26608.0x4e78 exited with code 3221225786]
[debug][Inferior 1 (process 26608) exited with code 030000000472]

[Inferior 1 (process 26608) exited with code 030000000472]

[debug]> quit

Debugger finished with status 0

--- End code ---


--- Quote ---Reading symbols from D:/Projects/c++/Denomination/bin/Release/denomination.exe...(no debugging symbols found)...done.

--- End quote ---


[0] Message Index

Go to full version