Author Topic: How to prevent automatic build (SOLVED)  (Read 2782 times)

Offline Cool Javelin

  • Multiple posting newcomer
  • *
  • Posts: 22
How to prevent automatic build (SOLVED)
« on: January 27, 2019, 11:38:50 pm »
There is a gear icon that can build my project, also a red play button that launches the debugger.

How can I prevent the debugger launcher from automatically rebuilding my project before launching?

I have been all over looking for this setting and I have search the web and this forum pretty extensively for an answer.

The reason for this question: I recently added some pre-build scripts, one of which increments a version number that is included as a header file.

Since then, C::B rebuilds the project each time I hit the red play button (launch the debugger.)

Sometimes I do not want to rebuild the project when I simply exit the debugger and restart it. (C::B doesn't know I have done no editing.)

Thanks for the help, Mark.
« Last Edit: January 30, 2019, 02:30:10 am by Cool Javelin »
My 1st computer was an IBM System 360. We used punch cards. God help us when the runner dropped the boxes on the way to the computer room.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: How to prevent automatic build
« Reply #1 on: January 28, 2019, 12:30:31 am »
Codeblocks will not rebuild if the source did not changed. It will only rebuild when the source changed and this is necessary before debugging, because the source and the debugee have to be in sync. Debugging would not work if the source and debugee differ (if you delete a function in your code, but debug this function, where should codeblocks jump if the debugger request this function?

To solve your problem:
Create a new target only for debugging, where you do not add the prebuild steps

or

Remove the tick at Project->Build options->Pre post build steps->Always execute, even if target is up to date . Then your version will only be incremented if you change your code...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to prevent automatic build
« Reply #2 on: January 28, 2019, 01:46:14 am »
How can I prevent the debugger launcher from automatically rebuilding my project before launching?
There is an option in the Settings -> Debugger -> Auto-build project if it is not up to date.
(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!]

Offline Cool Javelin

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: How to prevent automatic build
« Reply #3 on: January 30, 2019, 02:28:45 am »
Thank you oBFusCATed

That is the magic setting I wanted.

Mark.
My 1st computer was an IBM System 360. We used punch cards. God help us when the runner dropped the boxes on the way to the computer room.