Inno Setup: How to watch variables values or write to debug output?

孤人 提交于 2020-01-01 01:29:56

问题


How can I watch values of variables while debugging in Inno Setup? How can I print something to debug output?

Thanks


回答1:


There's currently no debug watch window, but you can simply hover the variable you want to inspect, when the debugger is stopped on a breakpoint. To print something to a debug output, use the Log procedure:

procedure InitializeWizard;
var
  Value: Integer;
begin
  Value := 123;
  Log('The Value is: ' + IntToStr(Value));
end;

Here is the result of the hovered Value variable from the previous script sample:

And the result of the debug output window after when you step over the Log statement:




回答2:


I have the same question, but I'm not able to see the value of a variable when hovering over it's label.

This is a piece of the code:

[Code]
var
   URLtext: String;
procedure InitializeWizard(); 
begin
   URLtext := ExpandConstant('{#MyAppURL}');
end;

When setting the breakpoint on the end; statement, I'm not able to view the value of the URLText variable. Hovering over it does nothing. The problem appears to be that I'm using Inno Script Studio Without this handy piece of software, hovering works OK.



来源:https://stackoverflow.com/questions/14674077/inno-setup-how-to-watch-variables-values-or-write-to-debug-output

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