Solved

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

Posted on 2009-05-18
7
844 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 36

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 36

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 36

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now