How do I debug a designtime package unloading crash involving a crash in ThreadProc in Classes.pas?

六月ゝ 毕业季﹏ 提交于 2019-12-01 09:01:05

I debugged the designtime package crash in the following manner:

  1. As already noted above, set up Delphi to run itself, using Run Parameters, in the Host Application, the path is c:\path-to-delphi-install\bin\bds.exe.

  2. Set a breakpoint in the line in function ThreadProc in System.pas.

  3. Open windows.pas, and around line 30,000-33,000 there is a line like this:

    function CreateThread; external kernel32 name 'CreateThread';

Set a breakpoint on the line above with F8. Now when anything in the code being debugged invokes that Win32 function, whether via TThread or not, you'll get a breakpoint.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!