Debugger not work when I set a break point in Delphi 2009

lwkenneth2
lwkenneth2 used Ask the Experts™
on
I am developing a Datasnap 2009 Server side,  When I try to set a break point, it will change to Green color when run the application.  seems the project have something special that I can't debugger.  Any Idea to solve this problem?  The debugger work before, it also work if I create a new project.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
Are you putting the breakpoint at empty line, variable declaration, or just comment then that will result in green and invalid breakpoints.

You may check this thread for more info.
Ferruccio AccalaiSenior developer, analyst and customer assistance

Commented:
Or simply there's not code to debug, maybe due to missed calls by the client, or due to not running client.
Speaking of a DataSnap server it could be the situation.
Emmanuel PASQUIERFreelance Project Manager
Top Expert 2010

Commented:
when you compile, a blue dot appears next to all "breakpoint-able" lines.
Do you confirm that the line where you want to put a break point has that blue dot ?
If that is the case, what happens if you hit F8 to start the application (step by step run) instead of F9 ? is your debug mode working or not at all ?
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Author

Commented:
I am sure there has code to debug, I even set the bleak point in Project Source, code like  Application.CreateFrom(....).  It also show in Green after I click F9.  If I click F8,  it will then go to CPU view,  I keep on press F8, it just loop through the code in CPU view.  then the application is run.  It never break in the code I write.  It seems this problem is just happened in the project.  If I try to create a new project, the debugger works.  
Ferruccio AccalaiSenior developer, analyst and customer assistance

Commented:
Again, take care that the code you want to debug is really executed. If it's a portion of code that must respond to a client call or something else but there're not calls, it could never be executed, so also not debugged.
Ephraim WangoyaSoftware Engineer

Commented:

First you have to select all the debug info and remove the compiler optimization. Then Build your project with the debug info and finally run run it then your breakpoints will be enabled

Author

Commented:
epasquier:

No blue dot in any line of my code
Freelance Project Manager
Top Expert 2010
Commented:
Well then it is consitent : you have no debugger at all. So that is not a problem of code that is not linked or called.
Check all the Debuging parameters in the IDE Options, maybe you have unchecked the integrated debuging

Author

Commented:
Finally, My problem is because the pas is not in the uses list of the project source file.  but it still can run without any problem.  I added it back to the source file and break point works now.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial