Executables created in LabVIEW can be debugged after having been compiled into an executable, (*.exe). However, this is only able to be done if "Enable debugging" was enabled in the build specification when the application was compiled with the LabVIEW Application builder.
Build Specification Settings
Under the "Advanced" category in the Build Specification:
- Enable debugging
- Enabled - "Builds in" the ability to connect to and debug the application to be compiled. This ability can then be enabled/disabled in the application at any time by modifying the "DebugServerEnabled" key in the [AppName].ini file after it has been compiled.
- Disabled - Completely disables any ability to connect to and debug the application once built. This ability can not be enabled even if the "DebugServerEnabled" key has been added and set to True in the [AppName].ini file.
- Wait for debugger on launch
- Enabled - If "Enable debugging" has been enabled, the built application can be accessed for debugging, but the application does not automatically run when launched. The application will have to be manually started by clicking on the run arrow.
- Disabled - The application will begin running immediately when the application is launched when "DebugServerEnabled" is enabled.
Application Configuration File
It should be noted that changes to the values of the following keys in the configuration file for the built application will be ignored if "Enable Debugging" was not checked in the Application builder when compiled.
Connecting to the Executable
In order to debug an executable that has been compiled with the proper settings (see above), the application must already be launched either on the local computer or on a computer accessible via a network connection.
- In LabVIEW, select the Operate >> Debug Application or Shared Library...
- Enter the machine name or IP address of the computer that is running the application. If the application is running on the local machine, enter localhost.
- If the "Application or shared library" drop-down doesn't show the name of the application that you are looking for and the application has been configured properly, click on "Refresh".
- Select the application that you wish to debug and click on "Connect".