Maw*_*awg 11 delphi outputdebugstring debugview
我想OutputDebugString()在我的应用程序中使用,然后可以选择在现场部署应用程序时在单独的查看器中显示它.
也就是说,我不想更改标志并重建我的.exe来打开和关闭调试.
谷歌搜索,似乎DebugView应该处理,但它和TraceTool都没有显示此代码的任何输出.
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
OutputDebugString(PChar('Hello, wurld'));
end;
end.
Run Code Online (Sandbox Code Playgroud)
我已阅读文档但无济于事,并看到其他人遇到过类似的问题,但尚未发布解决方案.
有解决方案吗?
RRU*_*RUZ 24
该DebugView工具工作正常; 只确保直接启动您的应用程序(不附带Delphi IDE或其他调试器).
无论如何,查看Delphi应用程序的OutputDebugString输出的自然方法是使用Delphi IDE和Event LogWindow.


小智 5
CnWizards包含一个工具CnDebugViewer.exe,它可以捕获OutputDebugString(应该在Windows 7中以管理员身份运行).
与DbgView不同,CnDebugViewer可以为不同的应用程序创建单独的选项卡.
CnPack包含一个单元CnDebug.pas.使用此单元,您可以跟踪类型化对象,集合,异常,memdump等.使用CnDebug.pas,您还可以设置是否自动启动CnDebugViewer,是否在发送调试消息时转储到文件等.
| 归档时间: |
|
| 查看次数: |
22400 次 |
| 最近记录: |