Brett
09-21-2004, 04:32 PM
Script: Enabling Debug Mode
Last Revision: September 21, 2004 (001)
Information
This script can be used to enable a debug mode in your setups that is configurable from the command line. This can be useful if you think you may need to do some advanced debugging of your setup on your or a customer's system.
To use this function in your Setup Factory 7.0 projects, simply copy and paste it into your Global Functions. You can get there by selecting Resources > Global Functions from the main menu.
To enable it at runtime, run your setup and pass it the command line argument "/DEBUG". For example:
C:\Output\Setup.exe /DEBUG
bDebugMode = false;
local nNumArgs = Table.Count(_CommandLineArgs);
if(nNumArgs > 0)then
for i,strArg in _CommandLineArgs do
if(strArg == "/DEBUG")then
bDebugMode = true;
end
end
end
if(bDebugMode)then
Debug.SetTraceMode(true);
Debug.ShowWindow(true);
end
Script Name: Enabling Debug Mode
Type: Setup Factory 7.0 Script
Created By: Brett Kapilik
Comments? Please post them here.
Last Revision: September 21, 2004 (001)
Information
This script can be used to enable a debug mode in your setups that is configurable from the command line. This can be useful if you think you may need to do some advanced debugging of your setup on your or a customer's system.
To use this function in your Setup Factory 7.0 projects, simply copy and paste it into your Global Functions. You can get there by selecting Resources > Global Functions from the main menu.
To enable it at runtime, run your setup and pass it the command line argument "/DEBUG". For example:
C:\Output\Setup.exe /DEBUG
bDebugMode = false;
local nNumArgs = Table.Count(_CommandLineArgs);
if(nNumArgs > 0)then
for i,strArg in _CommandLineArgs do
if(strArg == "/DEBUG")then
bDebugMode = true;
end
end
end
if(bDebugMode)then
Debug.SetTraceMode(true);
Debug.ShowWindow(true);
end
Script Name: Enabling Debug Mode
Type: Setup Factory 7.0 Script
Created By: Brett Kapilik
Comments? Please post them here.