• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 873
  • Last Modified:

Step (F8-F7) through component code in Delphi 2009

I have this buggy component i am working on.

I would like to test run this component and debug it.

Normally i do this by setting the host application in the run parameters to bds.exe.
When i run the component, this will open a second instance of bds.exe with the component installed.

But now it doesn't want to stop at the breakpoints.

Anybody has any ideas ?

0
Geert Gruwez
Asked:
Geert Gruwez
  • 4
  • 3
1 Solution
 
developmentguruCommented:
I would assume that this is a Delphi application that you are testing with?  Why not just run it in the IDE?
0
 
developmentguruCommented:
Sorry, I just noticed who wrote the question.  I would guess that the code was not compiled under Delphi 2009 and therefore uses different debug info (not compatible with Delphi 2009).  Can you recompile your test application in Delphi 2009 (or have the responsible party do so)?
0
 
Geert GruwezOracle dbaAuthor Commented:
lol, developmentguru ...
it's a delphi 2007 component (TTranslator from Polycon)

I compile it in Delphi 2009, and run it (run parameter / host application = bds.exe)

This way the second instance of Delphi 2009 has the last version of the component installed
and you can use it.
In Delphi 7 i did it this way to debug the component.

This no longer seems to work in Delphi 2009.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
developmentguruCommented:
Does a second version of Delphi 2009 start?  I am just thinking out loud here hoping it will jog some thoughts in you... If it does not start a new instance then... perhaps they have made it single instance?

Another thought crossed my mind... Is the component being run from a DLL/BPL?  If not this may be a way that you can force Delphi 2009 to allow what you are attemptig.  Once you have the BPL compiled you can run your program (loading the BPL) then start a new instance of Delphi 2009 and attach to the BPL...

I am home answering this late at night.  I hope the musings help.  I may have some more time to actually bring up an example at work tomorrow (I'll keep my fingers crossed).
0
 
Geert GruwezOracle dbaAuthor Commented:
lol,
i guess you don't do this type of thing.

when you want to debug a dll, bpl or any such library
you can do this like follows.

If you run a dll, (library) Delphi will give a warning.
Unless ... go to run menu / parameters.
There you have edit field to set the host application.
For a dll you would set the exe which will be loading the .dll and so you can debug it.

For a component (with a bpl) you can set the Delphi exe itself to act as exe which will be loading the component.
And then you can debug the component.
This doesn't seem to work anymore with Delphi 2009.

You don't need to attach, you can thus instruct Delphi to start a instance which will be running your library.

Here is a screenshot:

screenshot.png
0
 
developmentguruCommented:
I have done that before.  I am reminded of the old joke where the guy goes to the doctor and says, "He doc, it hurts when I move my arm like this (in an awkward fashion)."  The doctor replies, "Don't do that!"

If what you are (and have) been doing does not work you might want to try something else.  That was all I was getting at by doing the attach.  It could give you the same functionality while getting you around the immediate issue you are having.

I will try to find the time to set up my own testing project for this.  In the mean time I thought you might want to try an alternative.
0
 
Geert GruwezOracle dbaAuthor Commented:
Thanx for waisting some effort on this developmentguru.

I'll keep your suggestion for some other debugging
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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