How to debug Delphi project?
I'm a .NET developer, but I have got a quest - I must find errors in a Delphi project.
After opening a project (Borland Delphi 7) and trying to debug it ('Run' menu), I've noticed all debugging options are inactive (gray).
开发者_如何学JAVAHow can I make it usable?
I'm not sure why the pause button doesn't work, but I have seen Delphi 7 get "confused" and refuse to stop on legitimate breakpoints before.
- Make a backup of everything, just in case you don't have the source for all of the DCUs.
- Delete the project's DCUs.
- Make sure you're including debug information in the project's options.
- Do a full build (not just a recompile).
I hope this helps.
The debugger is always active, unless it is explicitly deactivated. Just run the application and the inactive menu items will become active. (For some options you have to have to pause the running application)
Just try pressing F8. This will run the application and pause at the first line of executable code and most of the debugging items will become active.
Hard to tell just from that description, but here are a few pointers.
- Make sure you've got a project (.dpr) loaded, and not just a source (.pas) file.
- Try to build the project with SHIFT-F9. When it's done, if everything compiles successfully, you'll see blue dots in the "gutter" at the left side of the text editor, showing which lines actually contain debuggable code. If you don't get any of those, go into Project Options and turn on the Debug option, then rebuild.
Once you've done that you should be able to run and debug the app.
Tools-->Debugger Options Make sure integrated debugging is checked.
精彩评论