Thread: Code Blocks Debugger not working

  1. #1
    Registered User
    Join Date
    Jun 2019
    Posts
    33

    Code Blocks Debugger not working

    Hi everyone,

    I have a serious problem.
    Code.Blocks' Debugger is not working at all, and I need it before saturday.
    The version of Code Blocks is 17.12
    The version of Windows is Windows10.


    It doesn't start debugging, it doesn't work at all, it is not capable to analyse every line, nothing.
    Here I write what is written:

    Active debugger config: GDB/CDB debuggerefault
    Building to ensure sources are up-to-date
    Selecting target:
    Debug
    Adding source dir: F:\tiprego\
    Adding source dir: F:\tiprego\
    Adding file: F:\tiprego\bin\Debug\tiprego.exe
    Changing directory to: F:/tiprego/.
    Set variable: PATH=.;C:\TDM-GCC-32\bin;C:\TDM-GCC-32;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;C:\ProgramData\Oracle\Ja va\javapath;C:\Program Files (x86)\Lenovo\FusionEngine;C:\Windows\System32;C:\W indows;C:\Windows\System32\wbem;C:\Windows\System3 2\WindowsPowerShell\v1.0;C:\Program Files (x86)\Common Files\LENOVO\easyplussdk\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\Program Files (x86)\IncrediBuild;C:\Windows\System32\OpenSSH;C:\ Users\Giuseppe\AppData\Local\Microsoft\WindowsApps
    Starting debugger: C:\TDM-GCC-32\bin\gdb32.exe -G -lines -2 -y F:/tiprego/; -srcpath F:/tiprego/; F:/tiprego/bin/Debug/tiprego.exe
    done
    Setting breakpoints
    Debugger finished with status 1
    Selecting target:
    Debug
    Adding source dir: F:\tiprego\
    Adding source dir: F:\tiprego\
    Adding file: F:\tiprego\bin\Debug\tiprego.exe
    Changing directory to: F:/tiprego/.
    Set variable: PATH=.;C:\TDM-GCC-32\bin;C:\TDM-GCC-32;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;C:\ProgramData\Oracle\Ja va\javapath;C:\Program Files (x86)\Lenovo\FusionEngine;C:\Windows\System32;C:\W indows;C:\Windows\System32\wbem;C:\Windows\System3 2\WindowsPowerShell\v1.0;C:\Program Files (x86)\Common Files\LENOVO\easyplussdk\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\Program Files (x86)\IncrediBuild;C:\Windows\System32\OpenSSH;C:\ Users\Giuseppe\AppData\Local\Microsoft\WindowsApps
    Starting debugger: C:\TDM-GCC-32\bin\gdb32.exe -G -lines -2 -y F:/tiprego/; -srcpath F:/tiprego/; F:/tiprego/bin/Debug/tiprego.exe
    done
    Debugger finished with status 1




    Help please!

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    3,775
    I suggest trying to debug from the cmd.exe prompt. If it works, then the problem is very likely in Code::Blocks configuration and you should ask your question on the Code::Blocks forum. If it fails to work, the problem is likely in the debugger.

    NOTE: Before checking the above, verify the program is compiled with the debugger option and that the program is not being striped of debug information. "-g" is the option to add debug info. And, I think "-s" is the option to strip the debug info.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    May 2019
    Posts
    214
    @letthem,

    Do you require GCC?

    If so, why?

    It's not that my question proposes GCC isn't a good compiler. GCC is famous for being first to implement new C++ standards, and more completely than most other compilers.

    It's also not quite so friendly with Windows compared to CLang/LLVM.

    Since you're on Windows 10, why are you not using Visual Studio? The Free CE versions are full featured. The debuggers work out of the box every time. You can install the CLang/LLVM compiler with little more than a click of a checkbox, and select it on the project configuration for use with all the tools as if it were the compiler the IDE was intended to use (it fits in nearly as well as Microsoft's own compiler).

    CLang has more modern language support than Microsoft's compiler, though a little behind GCC is some cases for C++20 support, and maybe a few minor points on C++17.

    However, overall, as a development environment on Windows, after 40+ years of doing this stuff I simply can't beat Visual Studio. I despise Microsoft overall, and I don't prefer Windows over Linux with the sole exception that vendors don't build Linux versions of their applications (everything from Photoshop and 3DS Max to various CAD and other products).

    If you want the debugging problem to be over with, try installing Visual Studio and give it a short while to grow on you.

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    3,775
    Microsoft's compiler is not a very good C Compiler that last time I checked!
    Has that changed? NOTE: I said C not C++!

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    4,498
    Has that changed?
    Not really, unless you're happy with C90 support. The C99 and C11 support is lacking and IMO the "Depreciation" of standard C constructs is problematic.

  6. #6
    Registered User
    Join Date
    May 2019
    Posts
    214
    @stahta01,

    Microsoft's compiler is not a very good C Compiler that last time I checked!
    Has that changed? NOTE: I said C not C++!

    Tim S.
    Yet, that is somewhat immaterial since using CLang/LLVM is a trivial part of installation and selection when configuring a project (VS 2017 & VS 2019). CLang might not be as current as GCC, but it's much better than Microsoft's compiler, even at optimization let alone language compliance, and otherwise you can hardly tell you've switched compilers with respect to the IDE's behavior (which is actually quite good).

    Point being that using VS since 2017 does not mean using only Microsoft's compiler - CLang is integrated rather well now. I'd argue it's Microsoft's admission that their own compiler team just isn't quite up to what is expected in professional use, and they'd otherwise have trouble with their "new" support for linux application development on Visual Studio if they didn't include other compilers in a fashion that is nearly as native for the IDE.
    Last edited by Niccolo; 06-27-2019 at 05:47 PM.

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    4,498
    Yet, that is somewhat immaterial since using CLang/LLVM is a trivial part of installation and selection when configuring a project (VS 2017 & VS 2019).
    Okay, but since this thread is talking about problems with the debugger, what benefit is there in using the Microsoft IDE? If you use the CLang/LLVM compiler you will need to use the debugger associated with that tool set.

    I have a serious problem.
    Code.Blocks' Debugger is not working at all, and I need it before saturday.
    IMO, this is probably a configuration issue, not an actual problem with the debugger. Post a copy of your project file and maybe someone might be able to spot the problem.

  8. #8
    Registered User
    Join Date
    May 2019
    Posts
    214
    Okay, but since this thread is talking about problems with the debugger, what benefit is there in using the Microsoft IDE? If you use the CLang/LLVM compiler you will need to use the debugger associated with that tool set.
    He stated this has to be done before Saturday.

    Quick install of MS IDE, debugger works out of the box, get past the current problem, THEN get around to figuring out what's wrong with CodeBlock's installation if the OP wants to get that one working.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code Blocks showing error in code! Don't know what's it.
    By kdushyant297 in forum C Programming
    Replies: 2
    Last Post: 09-08-2017, 09:59 AM
  2. Need information on using the Code::Bocks debugger
    By papagym177 in forum C++ Programming
    Replies: 2
    Last Post: 10-24-2014, 12:17 AM
  3. Template specialization not working in Code::Blocks...
    By tennisstar in forum C++ Programming
    Replies: 13
    Last Post: 12-18-2012, 12:30 PM
  4. Code::Blocks not working?
    By C++Froob in forum C++ Programming
    Replies: 2
    Last Post: 02-07-2010, 12:47 PM
  5. MS code::blocks
    By wart101 in forum C++ Programming
    Replies: 11
    Last Post: 12-14-2006, 11:59 AM

Tags for this Thread