One of the Delphi programming strength is that VCL source code is opened compared with other compiler. Somtimes, I need to debug VCL core module such as Classes.pas or Forms.pas. Let me introduce simple tips. I will show you an example using Classes.pas file.


1. Make Project and save.


2. Goto Classes.pas. Ctrl C+V all file contents.


3. Add New - Unit, Ctrl+V, and save Classes.pas into the same folder with the project.


4. Try to debug.




5. When you try to add some VCL unit, you can meet the following error.


The project already contains a form or module names ".....".


6. In this case, first, remove the exist unit in project file.




I hope it will be helpful to you.