Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-05-18
7
Medium Priority
?
865 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 38

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 21

Accepted Solution

by:
developmentguru earned 2000 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 38

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 38

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Suggested Courses

609 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