Solved

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

Posted on 2009-05-18
7
849 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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!

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

695 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