[转载]Delphi 修改 VCL Source Code 需知

from : http://bbs.ee.ntu.edu.tw/boards/Programming/10/2/13.html

◇ Delphi 修改 VCL Source Code 需知

发信人: [email protected] (葛瑞菲), 信区: programming
标  题: Delphi 修改 VCL Source Code 需知
发信站: 交大资工凤凰城资讯站 (Tue Aug 29 15:51:19 1995)
转信站: cis_nctu!news.cis.nctu!news.csie.nctu!phoenix

    Delphi 修改 VCL Source Code 需知

(0) 备份欲修改部份之 Source Code 以防万一.

(1) 点选 Menu File|New Project 建立一个新的 Project

(2) 点选 Menu File|Add File.. 载入欲修改的 VCL Sources Code
        
(3) 设定 Menu Options|Project 下列开关
    (否则您的VCL .DCU Size比原本的大一倍都有可能....)

    Project Options - Compiler
    Dubugging Group     
    (1) Debug information Turn Off
    (2) Local symbols Turn Off
    (3) Symbol info Turn Off

    Project Options - Linker
    EXE and DLL options Group
    (1) Optimize for size and load time Turn ON
    (2) include TDW debug info Turn OFF         

(4) 检查 Unit 中是否已经 Uses 欲修改之 VCL Unit.

(5) 以Project Manager再次检查欲修改的 Source Code Unit是否已
    加入 Project 中.加入Project后的Unit会被优先使用,而不再使用
    原本/DELPHI/LIB同名的 DCU.

(6) 修改完毕后点选Compile|Build All

(7) 待完毕无误后,Close Project.将新产生之 DCU 从 /DELPHI/SOURCE/VCL 搬至
    /DELPHI/LIB

(8) 点选 Option|Rebuild Library 重新产生 /DELPHI/BIN/COMPLIB.DCL.

(9) 撰写测试程式试之.

Cannot single step into VCL source code anymore

Question:

All of a sudden I cannot single step into the VCL source code anymore. The path to is in the Enviroment Options Direcotry and I also tried to add it to the but it did not help.
It appears that is correct since I added a absolute
path to the list and D5 reconized this was the path and
changed it back to automaticlly. What happened?

Answer:

Here are two possible reasons for your situation:

1) You may accidentally have unchecked in .
2) Perhaps you have switched  on. 
from: http://www.delphifaq.com/fq/q3061.shtml

Preventing the Debugger from stepping into VCL source

Does your debugger step into the VCL source code and you want to disable this?
Or are you in the opposite situation, you need to step into through the VCL source code?
Here are some pointers (for Delphi 5) what you should look at.

The following steps will stop the debugger from stepping into the VCL:

1) Go to menu 'Project | Options' and there click on tab 'Compiler'. Then uncheck the 'Use Debug DCUs' option under 'Debugging'. This is a project-specific setting.

2) Also check to be sure your Library path just points to LIB, not LIB/DEBUG. This is an environment option and will affect all projects.

3) Remove the VCL source directories from the Search Path. This is also a project specific setting. Choose under 'Project | Options' the tab 'Directories/Conditionals'. Delphi 5 allows to remove directories comfortably from the search path. The VCL source directories will look like

$(DELPHI)/Source/Vcl

There are problably be other directories below $(DELPHI)/Source, which you may want to remove as well. E.g. /RTL/

Happy Debugging!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章