Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

debugging - How to debug Delphi IDE?

What are the detailed steps on how to debug the Delphi IDE?

I understand, from other posts, that one needs to create a project and, in the project's debugger settings, set the project's "host application" to Delphi (C:Program FilesBorlandBDS3.0Binds.exe). Then, when the project is run in the debugger (by pressing the F9 key), a second instance of the Delphi IDE should appear.

I have managed to do the above step. However, when I run the project in debugger mode, I don't see any second instance of the Delphi IDE opening.

Motivation

There is a VCL component, for which I do have the source code, that builds, compiles and installs fine. But, when it is placed on a form in a project, Delphi hangs when you close the form. So, I want to find out why Delphi is freezing on exit with this component on a form. (It hangs at design-time, when closing the project).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Your project is most likely an EXE-type. EXE type projects don't need host applications so the setting is ignored, no other IDE is started. At a minimum, you should make your project a DLL-type: that will start the second IDE, but it will not be very helpful.

The technique you mentioned is usually used to debug your design time package projects. Create a design-time package project, install it into the IDE, set the project's host application to be the IDE, set some breakpoints, hit F9 and a second copy of Delphi will start.

You can also "debug" the Delphi IDE by manually starting a second copy yourself and then using the "Attach to process" command from the "Run" menu, but that's not going to be very useful since you can't easily find your code to set a breakpoint.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...