-
Notifications
You must be signed in to change notification settings - Fork 112
Debugger
Amy edited this page Aug 11, 2024
·
9 revisions
OpenDream has a Debug Adapter Protocol-compatible debugger. The debugger currently requires Visual Studio Code, and optionally a copy of OpenDream's source code if you want to develop OpenDream.
- Install Visual Studio Code.
- Install extension DreamMaker Language Client.
- Install extension OpenDream dev tools.
This option is the one most DM developers will want. It is for debugging DM code only.
- Use "Open Folder" to open your DM project.
- Press the "Start Debugging (F5)" button.
- The extension will automatically set up everything for you and run the compiler, server, and client.
This option allows dual DM and C# debugging and is the best option if you are developing OpenDream itself.
- Use "Open Folder" to open your DM project.
- Use "Add Folder to Workspace" to add your OpenDream source checkout to the workspace.
- Optionally save the workspace.
This option lets you compile and run a local copy of OpenDream without needing to download the binaries from Github, but does not let you debug OpenDream itself.
- In VSCode's options menu, search "Opendream: Source Path".
- Set it to the path to your OpenDream source checkout.
- Use "Configure Task" to select "OpenDream: compile YourStation.dme" and if you like, set it as a build task.
- Use "Debug: Add Configuration", type "OpenDream", and hit Enter to create the launch configuration.
- Set these new configurations as defaults if you so choose.
- First select the OpenDream configuration in the "Run and Debug" tab (Ctrl+Shift+D).
- Use "Debug: Start Debugging" (F5) to begin.
- If OpenDream is a workspace folder, the server will also be run with the .NET debugger.
- The client will be launched and connect to the server after the world initializes.
- Use "Debug: Start Without Debugging" (Ctrl+F5) to run with the debugger disabled.
- To pause as soon as possible, use "Debug: Start Debugging and Stop on Entry".
Supported features:
- Breakpoints
- Function breakpoints
- Break on runtime errors
- Threads, stack traces, arguments/locals/globals
- Pause, Continue, Step Over, Step In, Step Out
- Disassembly, instruction stepping, and the bytecode stack