Unity debugging support for VS Code
Clone or download
miniwolf Resolving issue with breakpoints being deleted for all other than newest
files.

Added error handling to breakpoints.
Updated logging for process and player connection discovery.
Latest commit 01e57ba Oct 4, 2018
Permalink
Failed to load latest commit information.
.vscode Fix launch.json for VS Code 1.0. Apr 18, 2016
External Updating libraries to resolve misuse of NRefactory within debugger-libs. Jun 22, 2018
Images Adding support for multithreaded stack traces. Jun 1, 2018
MonoDebug @ e4d7e34 Resolving issue with breakpoints being deleted for all other than newest Oct 4, 2018
MonoDevelop.Debugger.Soft.Unity @ 7f6946f Resolving issue with breakpoints being deleted for all other than newest Oct 4, 2018
Screenshots Resize screenshots to width 600. Jan 20, 2016
UnityDebug Resolving issue with breakpoints being deleted for all other than newest Oct 4, 2018
typescript Fix regression within attach unity debugger. This is necessary when E… Jul 11, 2018
.gitignore Adding new exception to list of exception breakpoints works. May 11, 2018
.gitmodules Fixing gitmodules and supported empty response. Oct 1, 2016
.vscodeignore Reworking packaging to support npm package model. May 14, 2018
Changelog.txt Resolving issue with breakpoints being deleted for all other than newest Oct 4, 2018
LICENSE.txt Add MIT LICENSE.txt Apr 21, 2017
Makefile New style api following vscode guidelines. May 7, 2018
Publish.txt Add Publish.txt to link to page for publishing updated extension. Apr 21, 2017
README.md Added support for circumventing string truncation by disabling ellipsing Apr 17, 2018
VSCode-UnityDebug.sln Moved UnityDebug project into its own folder. Nov 18, 2015
issue_template.md Update issue_template.md Jun 4, 2018
package.json Resolving issue with breakpoints being deleted for all other than newest Oct 4, 2018

README.md

Unity Debugger Extension for Visual Studio Code

Use Visual Studio Code to debug your Unity C# projects.

Setup

  • Open your Unity project folder in the Visual Studio Code.

  • Select the debug view on the left and click the cogwheel.

Debug View

  • In the drop down list select “Unity Debugger”. If you do not have Unity Debugger in the list, then you already have a .vscode/Launch.json file in your project that you must delete first.

Debugger List

  • You will now have a .vscode/Launch.json file in your Unity project folder and can select which Unity target you wish to debug.

Debugger List

  • All done. You can now debug your C# scripts in VS Code by setting a breakpoint in a C# script from your project, switching to the debug view and clicking the green triangle button to attach to Unity. Enter play mode in Unity and the breakpoint should hit in VS code.

Attach to Process Picker

New in version 1.1.0 it is now possible to select which Unity process you want to attach to from a quick pick menu.

  • In the command palette type "Unity Attach Debugger"

  • Wait a bit for the Unity processes list to appear at the top of the VS Code window.

  • Select the Unity process you wish to attach the debugger to.

Usage

Strings in the variable view is truncated to 100 characters, with appended ellipsis. "Example wor...". To view the entire value of this string add it to the watch fields. In addition, evaluating the variable using the debugger console will reveal the same result.

Building

To build this repository, clone it then get all submodules:

git clone https://github.com/Unity-Technologies/vscode-unity-debug
cd vscode-unity-debug
git submodule update --init --recursive

Then open VSCode-UnityDebug.sln in Visual Studio.