如何使用Delphi调试Windows服务?

前端之家收集整理的这篇文章主要介绍了如何使用Delphi调试Windows服务?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_404_0@
有没有办法使用Delphi完全调试Windows服务?

解决方法

您可以从 Colin Wilson’s NT Low Level Utilities使用unitDebugService.pas(页面已经没有, @L_502_1@)

然后在DPR中:

begin
  if (paramCount > 0) and (SameText(ParamStr(1),'-DEBUG')) then
  begin
    FreeAndNil (Application);
    Application := TDebugServiceApplication.Create(nil);
  end;

  //... the rest of the normal DPR code
end.

这样,您可以通过调试(通过设置项目调试器参数)在Delphi中运行,使用EXE作为服务,或者使用-DEBUG开关从命令行运行。

原文链接:https://www.f2er.com/delphi/103540.html

猜你在找的Delphi相关文章