Showing results for 
Search instead for 
Did you mean: 

Debugging c++ DLL called from LabVIEW (Visual Studio 2017)

Go to solution



I have run across an issue trying to debug a c++ DLL I've created in Visual Studio 2017 that is called form LabVIEW. In the past I was able to do this without issues. Now it seems that my breakpoints in the DLL can't be reached when I call a function residing in the DLL form LabVIEW. I am getting the message "The breakpoint will not currently be hit. No symbols have been loaded for this document." when I attempt to set a breakpoint.


The DLL was created using the Visual Studio DLL wizard. My VS2017 Configuration is for Debug, Platform: x64.


As in the past I am attaching to LabVIEW via the Debug->Attach to Process option after I start LabVIEW. As soon I complete the attach the breakpoint message described is presented. When I run my LabVIEW VI I don't hit the breakpoint (as the environment is telling me).


To try to figure out what might be happening I created a small DLL project & small The DLL contains two simple functions that I call using the Call Library Function Node in LabVIEW:

getVersion which retrieves the version of the DLL & returns it to the caller (LabVIEW in this case).

setAcqState which takes a value from a caller & sets the state of the DLL


I'm attaching my VS project and the LabVIEW VI I'm using as a test bed. I'm using LabVIEW Professional 2020 on a Windows 10 machine.


Any help is greatly appreciated!

Download All
0 Kudos
Message 1 of 2
Accepted by topic author CaveDweller

Hello Everyone,


I found a solution to the outlined problem with debugging a VS DLL.


I found this Discussion Board topic:

Solved: Debugging a c++ dll from visual studio 2010 - NI Community


Message 2 in this thread discusses setting the command option to start LabVIEW. I made this change and also set the Attach option to 'Yes' as shown below:



After making this change I rebuilt my solution then did the following:

I started LabVIEW & loaded my test VI.

My breakpoints in VS remained active.

Ran the VI & hit the breakpoints I set in the DLL.



0 Kudos
Message 2 of 2