Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 509
  • Last Modified:

delphi 2009 debug problem

I have a strange problem with a Delphi 2009 application
I run it in the IDE in debug mode with a breakpoint somewhere
The debugger does not break at that line in the unit, says line number N but well at line number N + 2 !
What I mean is that the highlighted line by the debugger is line N, but tjhe execution  is already 2 lines ahead.
So when I continue step by step, it continues always with these 2 lines ahead
Impossible to ... not become crazy !
0
LeTay
Asked:
LeTay
1 Solution
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
You should have the Option Optimization (in Project Options : Compiler : Code generation : Optimization) set to True, so the Ide use optimized code that is better than yours and is skipped.
Uncheck that option and use it just only before the last compile, when your code is reaaly bug free.
0
 
AshokCommented:
Try

Re-build all

Ashok
0
 
SteveBayCommented:
It may be related to a question I have answered in the past here:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23251474.html
0
 
Geert GruwezOracle dbaCommented:
this usually happens when you have opened a directory in your delphi IDE with a different .pas (but with the same name)
Delphi first checks the current directory when looking for .pas files.
0
 
LeTayAuthor Commented:
Many thanks !
I just used copy/paste for all the unit to a new file and renamed the file
I saw that the resulting filet was just one byte shorter !
And now the debug is okay
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now