0
\$\begingroup\$

I am new to Unity and I have been fighting with VSCode and debugging.

I am trying to attach a debugger to Unity to test some code that run in the editor without running the app ( kind of Unity extension debug )

Apparently there was an VsCode extension for this this but has been deprecated

Any idea how to make it work ?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$
  1. Install this extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode.mono-debug
  2. Create a launch.json file in <your Unity project dir>/.vscode/launch.json with this content

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Unity Editor",
            "type": "unity",
            "request": "launch"
        }
    ]
}

  1. In Unity click in the bottom right the debug icon
  2. In VsCode Run -> Start Debugging

Enjoy

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .