Skip to content

Testing OpenDebugAD7

Andrew Wang edited this page Feb 28, 2022 · 3 revisions

OpenDebugAD7 Testing

Testing OpenDebugAD7 uses the following test projects:

Debugger Testing

This project handles compiling, linking, and deploying test projects for specific platforms.

It also defines actual requests (commands), responses, and events. It is built on top of the DebugAdapterRunner test library.

CppTests

CppTests contains native debuggee projects, the test scripts and test configurations.

CppTests will run the tests using the configuration (config.xml) which is placed right next to CppTests.dll. Then it will run the test scripts.

Setup Tests

Make sure you have built the solution. See Building MIEngine for VSCode.

Note: You will want to publish at <MIEngine_Root>/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters for the tests to discover OpenDebugAD7

Windows

Windows is a bit complicated since you will either need to obtain Cygwin, MinGW or MSYS.

  1. Ensure you have installed the C++ toolchain and GDB and include where their path is to your environment PATH.

  2. You will want to use config_msys_gdb.xml as a template for your config.xml.

  3. You will want to create config.xml at <MIEngine_Root>\bin\DebugAdapterProtocolTests\Debug\CppTests.

  4. Then you should be able to run dotnet test <MIEngine_Root>\bin\DebugAdapterProtocolTests\Debug\CppTests\CppTests.dll

macOS

  1. Make sure you have the xcode tools installed.

  2. You will want to use config_lldb.xml as a template for your config.xml.

  3. You will want to create config.xml at <MIEngine_Root>/bin/DebugAdapterProtocolTests/Debug/CppTests.

  4. Then you should be able to run dotnet test <MIEngine_Root>/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll

Linux

  1. Make sure you have g++ and gdb installed.

  2. You will want to use config_gdb.xml as a template for your config.xml.

  3. You will want to create config.xml at <MIEngine_Root>/bin/DebugAdapterProtocolTests/Debug/CppTests.

  4. Then you should be able to run dotnet test <MIEngine_Root>/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll

Common Failures