Solved

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

Posted on 2009-05-18
7
847 Views
Last Modified: 2013-11-23
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
Comment
Question by:Geert Gruwez
  • 4
  • 3
7 Comments
 
LVL 21

Expert Comment

by:developmentguru
ID: 24413336
I would assume that this is a Delphi application that you are testing with?  Why not just run it in the IDE?
0
 
LVL 21

Expert Comment

by:developmentguru
ID: 24413351
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
 
LVL 37

Author Comment

by:Geert Gruwez
ID: 24415040
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 21

Accepted Solution

by:
developmentguru earned 500 total points
ID: 24418179
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
 
LVL 37

Author Comment

by:Geert Gruwez
ID: 24419279
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
 
LVL 21

Expert Comment

by:developmentguru
ID: 24427395
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
 
LVL 37

Author Comment

by:Geert Gruwez
ID: 24431834
Thanx for waisting some effort on this developmentguru.

I'll keep your suggestion for some other debugging
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question