Search code examples
c++debuggingblock

Edit and continue with C++? Preferably with Code::Blocks?


I am used to Java and Eclipse, as that was what I first programmed with. That said, in Eclipse, when debugging Java, you can make code changes, and save them, while the code is running. The changes to the code will then take effect in the debug window, without a change to your code.

I am wondering if you can do the same thing, or similar with C++. I am currently using Code::Blocks, and I'm wondering if there is a debugging plugin for it that does the same thing, or similar. I know about Edit and Continue in VS, but I would really rather stick with Code::Blocks. Also, I have not programmed C++ in Eclipse yet, and will hot swapping C++ work in Eclipse? Or is that a Java feature?


Solution

  • Java is JIT compiled (just in time, compiled at runtime) making this feature, perhaps not trivial, but not as significant a challenge as it is to implement in a C++ environment. I've been developing in Visual Studio for 10+ years now, and to be honest, I find edit and continue rather useless.

    As to having it in Code::Blocks, gcc would have to support incremental compilation before this was put significantly on the agenda of many C::B users. There was a project to add this functionality, but I'd say at this stage, you're out of luck.