Skip to content

Debug OpenDebugAD7 for VS Code

Andrew Wang edited this page Jan 21, 2022 · 3 revisions

The best way to debug OpenDebugAD7 for VS Code is to run the published build of it and run OpenDebugAD7[.exe] --server --pauseForDebugger

Note:

  • --server=<PORT> will have OpenDebugAD7 listen on port that you defined, if not it will default to 4711.
  • --pauseForDebugger will hold the OpenDebugAD7 process until you have attached a managed debugger to it.

To connect the VS Code instance to your development build of OpenDebugAD7, you will need to modify your VS Code launch.json configuration and add "debugServer": 4711 or the port you defined.

Below are instructions on how to attach to OpenDebugAD7 depending on what Operating System you are using.

Windows

On Windows, you can use Visual Studio to debug OpenDebugAD7.exe or use the similar steps below for Linux or macOS for debugging in VS Code.

Steps:

  1. Open src/MIDebugEngine.sln.
  2. Go to Debug -> Attach to Process
  3. Attach to the OpenDebugAD7.exe process. Note: If developing in WSL, you can use the WSL Transport Type to debug in Visual Studio.

Linux or macOS

  1. Open the MIEngine project folder
  2. Create a launch.json with the following configuration:
{
   "name": ".NET Core Attach",
   "type": "coreclr",
   "request": "attach"
}
  1. Start debugging and attach to the OpenDebugAD7 process.