User forums > Using Code::Blocks

Export to CMake

<< < (3/3)

stahta01:

--- Quote from: seasoned_geek on November 23, 2021, 05:19:41 pm ---I really don't know why (or maybe I just missed it) Code::Blocks doesn't have a Debug menu option that lets you navigate to a binary like Gede does. Gdb is Gdb.

--- End quote ---

Try "Debug" -> "Attach to process" it might do what you want.
I have never used it.

And, if you have not already tried this try it.
Project -> Set program arguments
Host application

Tim S.

cacb:

--- Quote from: seasoned_geek on November 23, 2021, 05:19:41 pm ---Thanks for your response. If I get time I will look into it.

For now, if they want to use Code::Blocks they have to:


* Edit CMakeLists.txt
* cmake . -G "CodeBlocks - Unix Makefiles"
* Edit and compile all of the source files. Repeating this process when they add new source files
* Use Gede to debug
--- End quote ---
I forgot to say that Code::Blocks is supported in Premake5 as an "action" that must be installed separately
https://github.com/chris-be/premake-codeblocks


--- Quote from: seasoned_geek on November 23, 2021, 05:19:41 pm ---I really don't know why (or maybe I just missed it) Code::Blocks doesn't have a Debug menu option that lets you navigate to a binary like Gede does. Gdb is Gdb.

--- End quote ---

As for the issue of debugging applications built with CMake, maybe it can be resolved without changing C::B, that is the first thing I would check. Debug -> Attach to Process is perhaps a way? If that doesn't solve it. perhaps a simple patch to C::B will?

Btw. Gede looks nice. I was never 100% satisfied with the builtin debugger in Code::Blocks. On Windows I use the MSVC compiler in Code::Blocks, but launch the Visual Studio debugger from the C::B Tools menu. I will try the same approach on Linux with Gede and see what happens, thanks for the idea.

jordi:
Hi all,
I am a newbie in codeblocks and cmake programs but I did a test with a cmake project in https://gitlab.com/CLIUtils/modern-cmake/tree/master/examples/simple-project
Effectively, codeblocks debugger is not working with
cmake . -G "CodeBlocks - Unix Makefiles"
Because with the above command you are compiling without the debugging compiler option.
I've tried with the next command
jordi@debian:~/test/cmake/simple-project/build$ cmake  -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
and codeblocks debugger works correctly.
Regards

ollydbg:

--- Quote from: cacb on November 24, 2021, 09:36:59 am ---Btw. Gede looks nice. I was never 100% satisfied with the builtin debugger in Code::Blocks. On Windows I use the MSVC compiler in Code::Blocks, but launch the Visual Studio debugger from the C::B Tools menu. I will try the same approach on Linux with Gede and see what happens, thanks for the idea.

--- End quote ---

C::B's debugger need to be improved, OBF's has an gdb-mi debugger plugin implemented several years ago. But I think he does not have time to maintain it.

I see gede also has a gdbmiparser.cpp file as its source code.

Navigation

[0] Message Index

[*] Previous page

Go to full version