How to use Microsoft Visual Studio to debug a DLL function called from ATEasy

Knowledge Base Article # Q200219

Read Prior Article Read Next Article
Summary Using VIsual Studio's Debugger to step through a DLL function source code that has been called from ATEasy
Login to rate article
ATEasy is capable of interfacing with and calling external libraries such as DLL, .NET assemblies and ActiveX components.

Sometimes it is necessary and useful to be able to debug and step into the code that resides in the external library. The procedure described here demonstrates debugging a C/C++ DLL debugged in Visual Studio 2005 . A similar approach can be done to debug ActiveX or .NET assembly and other development environments than Visual Studio (for example LabWindows /CVi).

Follow these steps to debug your DLL using Visual Studio:

1. Compile your DLL project within Visual Studio C++ in Debug mode.

2. Set the Visual Studio DLL project debug Command to ATEasy (ATEasy.exe) and the Working Directory to the ATEasy directory path (by default:
C:\Program Files\ATEasy\):

Visual Studio Debugger Property Page

3. Place a breakpoint in the DLL source in the function ATEasy will call .

Visual Studio Debugger Break Point

4. Begin a debug session from within Visual Studio. This should result in ATEasy being started by visual studio debugger:

Visual Studio Debugge Runr

5. Make sure your ATEasy module library points to the debug version of the DLL file:

ATEasy DLL Path

6. In ATEasy, run the DLL function using DoIt or Start:

ATEasy DoIt Start

7. The Visual Studio IDE should be paused when the breakpoint set earlier is reached. The debugger can now be used to step through the code:

Visual Studio Debugger Step Through Code

8. You can confirm that the correct DLL is loaded by going to Debug | Windows | Modules from the Visual Studio file menu:

Visual Studio Debugger Modules
Article Date 5/12/2011 , 6/1/2021
Keywords ATEasy, DLL, Microsoft Visual Studio, LabWindows/CVi, Debugger, source code

Login to rate article

Read Prior Article Read Next Article