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
ATEasy is capable of interface and call 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 reside 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 11:01:38 AM     Updated: 5/12/2011 11:04:16 AM
Keywords ATEasy, DLL, Microsoft Visual Studio, LabWindows/CVi, Debugger, source code

0 ratings | 0 out of 5
Read Prior Article Read Next Article