11-09-2015 05:23 AM
Hello all,
I have an older LabWindows/CVI DLL which I call from VS 2013 express.
However, I want to be able to debug the DLL by setting breakpoints in e.g. the initialize.
This is what I've done:
In the LabWindows/CVI proj, specify the executable and command line to visual studio exe "D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WDExpress.exe".
Run the LabWindows/CVI proj, visual studio opens, select the VS proj, run it and go the to initilize DLL call (LabWindows/CVI DLL), which has breakpoints.
Now when the step in VS is executed the breakpoint in LabWindows/CVI is not hit and VS just moves to the next step.
Is there a reason why the breakpoint in the initialize function doesn't get hit?
When specifying in LabWindows/CVI the exe that the VS projects generates iso the VS exe, hits the breakpoints in LabWindows/CVI...
So how can I set the LabWindows/CVI proj so it looks at the VS generated exe iso the VS exe itself?
LabWindows/CVI 2013 SP 2, Visual studio 2013 express, both proj debug mode.
Thanks in advance.
brgds
Jeroen C
11-09-2015 06:15 AM
Hello Jeroen,
I don't understand what you want to accomplish.
If you specify the executable and command line to visual studio exe ("D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WDExpress.exe") you are attempting to debug VC, which is not what you want.
You should specify the exe that loads the LabWindows/CVI dll which is the exe generated by VC. But I think you already did this, this is what I understand by
When specifying in LabWindows/CVI the exe that the VS projects generates iso the VS exe, hits the breakpoints in LabWindows/CVI...
I don't understand exactly what the problem is.
Constantin
11-09-2015 09:35 AM
Hello Constantin,
My goal is to debug my visual studio proj and LabWindows/CVI DLL at the same time by stepping through the code in VS and in LabWindows/CVI.
I want to be able to step through VS code that calls the LabWindows/CVI DLL and hit a breakpoint in the LabWindows/CVI proj and step through it in the LabWindows/CVI method.
Trying to attach LabWindows/CVI to the exe that VS generated is something that I'm unable to. LabWindows/CVI gives an error that it's unable to attach.
brgds
Jeroen C
11-09-2015 09:47 AM
Hello Jeroen,
You can't do that because you can't be attached with 2 debuggers to the same process in the same time.
You have to do one at a time.
You can detach from one environment and attach with the other one but you have to add some waiting in your code to have time to do this.
From LabWindows/CVI you can attach from Run->Attach to Process/Detach from process menu and from VC with Debug->Attach to Process/Detach All
Constantin