40

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

Thanks

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Timofei Davydik
  • 7,244
  • 7
  • 33
  • 59

1 Answers1

62

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:

enter image description here

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

enter image description here

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
TLama
  • 75,147
  • 17
  • 214
  • 392
  • 8
    That's helpful, thanks. Wish I could look at properties and values of COM objects. It's worth noting that this hover-to-show approach works in the Inno Setup Compiler, but not in Inno Script Studio or Inno IDE. – Mark Berry Dec 29 '15 at 02:19