Source has been modified. Rebuild?
One of the questions that was asked during my CodeRage session yesterday was: “Is there a way in Delphi 2007 to disable the ’Source has been modified. Rebuild?’ prompt that appears when you edit source code during a debug session?”
My answer to this question was “No, not yet”, but it turns out I lied. It wasn’t an intentional lie, however. Early on in the development cycle for Delphi 2007, I added a way that you can disable this prompt. However, that was over a year ago, and I had completely forgotten that I had done that (wow, I must be getting old….).
Here’s how you will be able to disable this prompt in Delphi 2007 (when it is available):
- After installing, run the IDE.
- Go to Tools | Options and press OK
- Shut down the IDE
- Using regedit, change the “HKEY_CURRENT_USERSoftwareBorlandBDS5.0DebuggingPromptToRebuildDuringDebugging” registry key’s value from it’s default value of “1“ to “0“:
- Restart the IDE
If you’ve already run the IDE and accessed the Tools | Options dialog at least once, you can skip the first two steps, as they are only needed to populate the registry with the key that you will be changing.
Now, when you modify source code during a debug session, the IDE will not prompt you to rebuild your project. To turn the prompt back on again, simply edit the registry again and change the value back to “1”. I should probably mention the standard caveats that go along with editing your registry directly: make a backup first, be careful, don’t do this unless you are comfortable mucking with the registry, etc….
The goal is to eventually make this a “real” feature by adding a “Don’t ask me this again” checkbox to the “Source has been modified. Rebuild?” dialog box, and then providing an easy way to turn it back on (probably on the main Debugger Options page in the Tools | Options dialog), but for now, with Delphi 2007, you will at least have the option to make this dialog box never show up.
Share This | Email this page to a friend
Posted by Chris Hesik on March 13th, 2007 under CodeGear Debugger |

RSS Feed

March 13th, 2007 at 10:35 am
That is really great. One feature less in DDevExtensions that I must maintain.
March 14th, 2007 at 2:33 am
Thanks for the hint Chris.
Hidden.
Why not putting in Tools | Options as a checkbox?
Regards
March 14th, 2007 at 8:34 pm
I’d really like that in Delphi 7.
March 19th, 2007 at 1:53 pm
But what does it do?
Recompile or not?
March 19th, 2007 at 3:14 pm
Brad,
Good question…. I guess I should have specified. If you use set the registry key, the debugger will not rebuild. It is the equivalent of saying "No" to the rebuild prompt. The logic being if you want to rebuild while debugging after setting the registry key, you will manually rebuild.
July 20th, 2007 at 1:06 am
What shits me is it comes up even when you HAVENT changed your source code.
September 28th, 2009 at 4:49 pm
I could not get this to work in Delphi 2009
I used this key
HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\6.0\Debugging\PromptToRebuildDuringDebugging
I tried dword and string values
I tried "PromptToRebuildDuringDebugging" and also with spaces "Prompt To Rebuild During Debugging"
Am I doing something wrong ?
October 5th, 2009 at 8:54 am
@Scott:
You need to change that key under HKEY_CURRENT_USER rather than HKEY_LOCAL_MACHINE.