How Can I Use LabVIEW to Debug a Built EXE File on My Local Host PC?

Updated Nov 23, 2020

Environment

Software

  • LabVIEW
  • LabVIEW Application Builder Module

I have an unknown problem while running an application I built. I think it is a software problem so I want to try debugging. Is there a way to debug the EXE file on my Local Host PC?

EXE files can be debugged. To debug EXE files, you need to select one setting before building an EXE file.
Please refer to figures below.

1. Click Build Specifications » New » Application(EXE) in your project.

2. Move the Main VI to the Startup VIs box in Source Files category. Select your Main VI and click the right arrow button.

3. Move to Category » Advanced and check Enable debugging.

4. Click Build in your application to make the EXE file.

5. Run the EXE file that you made.

6. Open your Project then Click Operate » Debug Application or Shared Library... (Keep the EXE open. If you close the application, LabVIEW cannot access the EXE.)



7. Write localhost(If you debug in Local PC) in Machine name or IP address tab and click Refresh button. Select your EXE file in Application or Shared library tab. Last, click the Connect button. (If you debug in Target PC, refer to Remotely Debugging Executables in LabVIEW)

8. After that, the front panel and block diagram are open. So you can debug the block diagram. You can use Highlight Execution, Probe etc.


Additional Information

LabVIEW can not debug re-entry applications or shared libraries that the Open VI Reference function creates. This is typically a problem when using Actor Framework or equivalent models.