Debugging D5 design time (package)

I have to debug the initialization of one of my components at design time. I set several breakpoints in the package and runned a second delphi - but delphi does neither stop on the breakpoints nor show me the source code when it stops on a exception. It just stops on exceptions and shows me the CPU window.
What I'm doing wrong?
aacrgAsked:
Who is Participating?
 
shenqwCommented:
OK, Follow me step by step:

1. First,Create your package.
2. In your package window,right click ,run Options.... command.
  set the Optimization off, All Debugging on. also in Directories/Conditions
page ,Set Search path : $(delphi)\source\vcl. Attenion, correct setting is in
package window. not in the Project|Options....
3. Build All and Install the package.
4. Exit All Delphi IDEs.
5. Find the package file, DBLClick the file to only open it alone.
6. Set Run|Parameters....  Host Application to C:\Program Files\Borland\Delphi5\Bin\delphi32.exe
(Your own correct path).
7. In you package file, you can set the breakpoint.like at  Register, .Create
and so on.
8. Click Run. Then you can debug your package now.

//I had tried successfully. based on Win98/NT+Delphi5+Pack1.
0
 
jeurkCommented:
You have the source in the path ?
you have not checked the optimized dircetive and you have not build it with runtime packages ?
0
 
aacrgAuthor Commented:
I have the sourcepath (where the *.pas lies) in the environment search path.
I have checked the optimize directive and it is a runtime package. (I'm not debugging a property editor or component editor. I'm debugging the component itself - but at design time.)
0
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.

 
jeurkCommented:
ok, I understood that.
Could you try to uncheck the optimize directive ?
Do you have a blue dot in your IDE at the line you set a break point ?
sorry it may sound a bit basic but I cannot imagine you level from here ;) ...
0
 
aacrgAuthor Commented:
The optimize flag doesn't change anything.  I have set source path for debugger. I have this blue dots - till I run the second Delhpi.exe.
0
 
fulg0reCommented:
all you have to do is to declare the creation manually... i mean get a var of your type and run the constructor... then set the breakpoints...

try that...
0
 
aacrgAuthor Commented:
Sorry, how to? I have to debug recreating the inherited properties.
0
 
ITugayCommented:
listening...
0
 
aacrgAuthor Commented:
The problem was that delphi clears the reference info flag when you compile the package/project. I suggest that the points belongs to jeurk.
Thanx, aacrg.
0
 
shenqwCommented:
shenqw changed the proposed answer to a comment
0
 
aacrgAuthor Commented:
Now it works, but I really don't know who of you helped me to get there... The problem with the reference info has gone - i've no idea why...
aacrg
0
 
rwilson032697Commented:
Listening
0
 
aacrgAuthor Commented:
Sorry, I nearly forgot that Q. Who of you is going to get the points? Should I ask EE to share the points?
0
 
jeurkCommented:
Hi,
If you can see who helped you...
If you do'nt know just delete the question.
At last if nobody wants the points and you absolutely want to give them out...
Give them to me ;) with an A ;)
Ok, just kidding...
CE
0
 
aacrgAuthor Commented:
shenqw, what do you think?
0
 
shenqwCommented:
hi,aacrg
  It's decided by you.  :)))
  whoever you give the points to,I will agree with you.

shenqw
0
 
aacrgAuthor Commented:
Comment accepted as answer
0
 
aacrgAuthor Commented:
I accepted it as answer because it was the completest description how to do it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.