Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zed Unity Extension

Adds debugging support for the Unity game engine to Zed via unity-dap.

Caution

This extension can connect to a running Unity instance, but due to an upstream issue in unity-dap debugging currently does not work on Windows with the latest Mono runtime.

Requirements

unity-dap requires an explicit installation of Mono.

Warning

The version of Mono that ships with Unity will not work.

Installation

Currently only supported as a dev extension; see Developing an Extension Locally.

Configuration

You need to explicitly tell the extension where to find the Mono runtime binary (i.e. mono.exe) - this can be done in a debug task or by overriding the DAP binary in settings.json:

{
  "dap": {
    "UnityDAP": {
      "binary": "C:\\Program Files\\Mono\\bin\\mono.exe"
    }
  }
}

Note

There is currently no way to override the unity-dap binary from within Zed, however it will automatically look for the latest version present in the extension's working directory (i.e. %LOCALAPPDATA%\Zed\extensions\work\unity-engine on Windows) - if you want to use a custom version of unity-dap then all you need to do is drop the build into this folder and name it with a higher precedence than the other installs, eg:

%LOCALAPPDATA%\Zed\extensions\work\unity-engine\
| unity-debug-adapter-v0.0.1\    # Automatically fetched Github release.
| | Release\...
| unity-debug-adapter-v1.0.0\    # Custom build - higher version will be prioritised.
| | Release\unity-debug-adapter.exe

To connect to a running Unity instance on the same machine as the debugger you can use Zed's Attach dialog, set the debugger to UnityDAP (bottom right) and select the desired process:

image

Otherwise, you can add a new debug task and explicitly supply the address and port to connect to:

{
  "label": "Unity Editor",
  "adapter": "UnityDAP",
  "monoPath": "C:\\Program Files\\Mono\\bin\\mono.exe",
  "logLevel": "warn",
  "address": "127.0.0.1",
  "port": 56492
}

About

Zed extension to add debugging support for the Unity game engine.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages