User forums > Using Code::Blocks

Debugging custom makefile project

(1/2) > >>

havarti:
Hi

I am using CB to work with a custom makefile project. Here is what I have done so far:

1) Under "project -> properties" I have checked "This is a custom makefile"
2) Under "Build Targets" I have deleted "Debug" and "Release" and added a new target with the name of my executable. It is a console app., and I have made sure that the two "Auto-genereated..." options are not checked.

When I press F9 it works as intended, the project is built and run. Now I would like to debug the project: What should I do in order to make it work? Say I follow the same approach as above: What must I do differently to make it enter debug-mode?

stahta01:
I think you should do the same as if debugging an external built exe.

I know you have to tell CB where the exe is located; but, no idea how to do that.

Tim S.
 

havarti:

--- Quote from: stahta01 on February 28, 2014, 01:01:37 pm ---I know you have to tell CB where the exe is located; but, no idea how to do that.

--- End quote ---

That I know how to do, I did that as well in order to run custom make file. But how do I enter debug-mode?

stahta01:

--- Quote from: havarti on February 28, 2014, 01:03:04 pm ---
--- Quote from: stahta01 on February 28, 2014, 01:01:37 pm ---I know you have to tell CB where the exe is located; but, no idea how to do that.

--- End quote ---

That I know how to do, I did that as well in order to run custom make file. But how do I enter debug-mode?

--- End quote ---

Try the normal way.

"Debug" -> "Start/Continue" (F8)

The "Debug" should be to the right of "Build" menu.

Tim S.

havarti:
Thanks, tried what you suggested. I get the error "warning: GDB: Failed to set controlling terminal: Operation not permitted" -- but I read on this forum that one can ignore this message.

However, when I put a breakpoint, it still doesn't break at that point. So seems something is still wrong

Navigation

[0] Message Index

[#] Next page

Go to full version