Search code examples
delphisettingsdevelopment-environmentbreakpoints

Delphi 6 doesn't trigger breakpoints


After installation of Delphi 6 at new working station I issued problem with breakpoints. In debug mode environment doesn't trigger breakpoints like they are not placed at all...

Have you experienced similar situation? I suppose reason is some setting, but I cannot find which one...

TnX in advance!

Nemanja


Solution

  • Yes, this sometimes happens (not only in 6).

    • Enable all debug information except debug DCU's unless you want to debug the Borland code. (Don't forget to check for compiler switches in the code).
    • Disable code optimizer.
    • Rebuild all code.
    • If you are using DLL's be sure to enable debug code in all projects and set the host application to the right executable.

    If that fails.

    • Be sure that there are blue dots at the code.
    • Be sure you have the right source file. You can check this by adding an error (for example dghasgsgd) and recompile, if the compiler accepts, this is not the right source file.
    • Be sure the code is reached (add a SendMessage statement or a message box so you can be sure the statement is reached.).
    • Restart the compiler. Or even restart the pc.

    If that fails.

    • Take a break. Have a lunch or get something to drink.
    • Return and show the problem to a coworker. (preferably a programmer too).