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...