GeoCitiesRank My SiteTake A TourMy GuestbookChat
Pages Like MineSearchSend This PageForums
Email Me
ResearchTriangle

"THE FUTURE IS NOW" / DELPHI

Max Vlasov Delphi Page


I think the best thing i can suggest now is ...

DEBUG YOUR COMPONENTS IN DESIGN-TIME WITH DELPHI 3.0 ENVIRONMENT! (Max Vlasov Tip).

If you agree it's useful, please, add the reference of this page to your page!

Maybe it looks like too complex decision, but in fact it's very simple and useful.
  1. Create empty DLL Project. You don't need to add any code to it, except an additional word in uses section, discussed later. Let's call it 'debuglibrary'.

  2. Create new component (you can use existing component) and add it to your package. For example : 'testcomponent.pas' to 'testpackage.dpk'.

  3. You need to add 3 additional lines to your component code. I prefer to use a unit with two procedures ('LoadDebugDll','UnLoadDebugDll').

      - Global Variable ('var H:THandle;');
      - Line 'H:=LoadLibrary( {here you add full path of the 'debuglibrary.dll'})'. When this line is executed you can go any debug points. I think, the best place for this line is after 'inherited Create...'.
      - Line 'FreeLibrary(H)'. You need this to Unload Library. When this line executed yopu can not handle your debug points. The best place for this line - before 'inherited Destroy;'

  4. Compile 'testpackage' package. You also have to install it, if it's the first time the package being used.

  5. Go 'Project/Options/Packages' page. Check 'Build with runtime packages' option. Press 'Add' button and add 'testpackage' to this project ('debuglibrary' project ).

  6. Add 'testcomponent' to uses section in 'debuglibrary.dll' source file.

  7. Go 'Run/Parameters' Dialog. Choose 'Delphi32.exe' file in your 'Delphi/Bin' folder as 'Host Application'.

And now you can set any breakpoints and click 'Run' button. Enjoy the Delphi power! (Don't forget you can access the debug points only after 'LoadLibrary' was executed)

Also, you can debug your additional tools (OpenTools API) in such way, because OpenTools API units also have to be intstalled in packages.


Back to Max Vlasov Home Page

Send me e-mail maxim_vlasov@hotmail.com.
Maybe i'm not quite familiar with English and i'll be glad to make corrections
you're the th visitor of my page


This page hosted by   Get your own Free Home Page
1