A new version of the Unity Debugger Extension for Visual Studio Code is being released here for early testing and feedback. The debugger extension has been upgraded to the latest debugger libraries to provide a better debugging experience and try to address some of the issues found by users. The main issue this new release addresses is support for the new.NET 4.x Mono runtime in Unity. Please report any kind of feedback in this thread and help us track issues by reporting them on the GitHub repo: Download. If you need to download an earlier release please visit the GitHub page and download them from the release page.
Do you want the most powerful Unity development environment? Create, debug, enhance productivity with Visual Studio Unity tools. Download for free today. Do you want the most powerful Unity development environment? Create, debug, enhance productivity with Visual Studio Unity tools. WebGL, Mac, PC and Linux desktop, web or consoles. I'm having an issue with using Visual Studio for Mac. Everything seems to be working fine, but when I press cmd+enter in VS to begin using VS with Unity I am met with a litany of warnings that not only have never come up before using VS, but do not appear in the actual Unity scene editor.
This link will be kept up-to date with the latest version at all times. Installation Warning: Installing this version will override your existing Unity Debugger extension.
The provided.vsix file can be manually installed from inside VS Code by following these instructions:. Open your workspace, in the extension tab in the left menu.
Here you can open settings on the three dots in the bar with the name Extensions. Click install from VSIX How to uninstall.
Go to the extension tab. Click on the cogwheel next to the Debugger for Unity 2.0.0 under installed. Choose to uninstall. Release notes 2.6.6. Updated attaching to standalone players 2.5.0. New logo that supports dark and light theme 2.4.2. Command 'Unity Attach Debugger'.
Automatic detection using `Library/EditorInstance.json`. Setting a breakpoint has been refactored. 2.3.0. 2.2.0.
2.1.0. 2.0.0. Updated debugger libraries to support.NET 4.6 runtime in Unity. Fix issue with being able to detach from Unity, which would cause the Unity Editor to hang.
Various instabilities fixes, such as LINQ debugging for.NET 4.6 runtime, hovering variables, complex class debugging etc. Minimum Requirements.
New 2.1.0 release of the Debugger Extension is out. This version should make it possible to see strings longer than 100 characters. The way to do that is by evaluating the string in the debugger console or to add it to a watch field. This is a work around, due to how debugger extensions are done in VS Code, maybe a cleaner fix can be found going forward. However this makes sure that it is possible to see the string variable.
As an after thought it is also possible to move the ellipsing of the string to 1000 characters if that would be of any use? Then the truncation would happen on much longer strings, but still not pollute the variables view. What do you think? Click to expand.It works really well right now! It catches every breakpoint, and skip all removed BPs.
I found two more issues: 1. If you put breakpoints before attaching debugger, they will be 'grayed' and debugger will skip them during execution. Once you put another breakpoint or remove one of the 'grayed' breakpoints, they become active.
I found the way to freeze editor. Here is procedure to reproduce this issue:. Open project.
Press play button. After few seconds press it again (turn off the game). Go to vscode, then attach and detach debugger few times (press F5, then immediately Shift+F5, and repeat it 5-10 times). Go to unity and press play button again.
At this point editor is not responding to any command and I have to kill it. Hi there, Thank you for your work on the extension.
VS Code is definitely my favorite editor to use, however I still often have to switch to Visual Studio when I want to be efficient at debugging because of a few issues. Click to expand.- I am trying to find a reproducable project where the debugger hangs my game, but have yet to find something that I can solidly rely on to help remove the problem. Currently I am working on trying to find the root of the problem with static variables. However it seems like there are some deeper problem in the `debugger-libs` that this extension is based on. I will be reporting this problem to the mono guys, who are in charge of working on this side of things.
I still have a hanging issue with them, regarding a problem with LINQ expressions. Member variables of collections elements, do you mean a custom collection, or are we talking something as simple as myListVariable.length? I am trying to find a reproducable project where the debugger hangs my game, but have yet to find something that I can solidly rely on to help remove the problem.
Currently I am working on trying to find the root of the problem with static variables. However it seems like there are some deeper problem in the `debugger-libs` that this extension is based on. I will be reporting this problem to the mono guys, who are in charge of working on this side of things. I still have a hanging issue with them, regarding a problem with LINQ expressions. Member variables of collections elements, do you mean a custom collection, or are we talking something as simple as myListVariable.length? Nothing in any log.
I'm trying to use 2.5.0 with Unity 5.6.5, macOS 10.13.4 but like I'm getting 'Debug adapter process has terminated unexpectedly' when I try to attach. I already tried this process: - uninstall extension - remove.vscode/extensions/Unity.unity-debug. install 2.5.0 This has not helped. The log.vscode/extensions/Unity.unity-debug-2.5.0//bin/UnityDebug-log.txt doesn't seem to have anything of interest. I dunno if 2.5.0 was the version your mentioned that 'has refactored much of the code and the way it interacts with vscode extension libraries'? Is there something else I can try or more info I can provide you with?
I've had it twice now where Unity crashed while debugging (can't provide exact repro steps at this point) and the debugger tool removed the ability to add variables to the watch list. Last time I had to completely remove and reclone my project, which I rather not do again.
Is there a config file with the debugger info that I can remove to reset the extension? (just addtional info: I tried reinstalling the extension from the vsix on GitHub, and while it updated to the latest version, it didn't reset the extension). If you are getting a Unity Editor crash I would recommend that you file a bug report to get the issue resolved. It is impossible to resolve the issue, just from knowing it is crash. When filing the bug report, we get information such as editor.log and so on, that can hopefully help us pinpoint the problem.
Regarding your problem, of being unable to add variables to the watch list, I would be very interested in having some repro steps of that. So if you get a specific issue I can have a look at, please make a github issue about using the link in the description. The debugger extension doesn't have a state that it is storing anywhere, the%USERPROFILE%/.vscode/extensions/ is the only place where it store the extension, all files are located there. But there is no 'reset extension', as far as I know.
You can uninstall the extension and install it again. Also, I have seen issues with people upgrading their extension that overriding doesn't go that smoothly. I always go to the.vscode/extensions folder and delete the debugger folder for the unity debugger, to make sure nothing is left when uninstalling.
Thanks for the explanation. For the UnityEditor crash, is not that unusual that it'll crash for me (or my colleagues, for that matter). Last time I opened a bug for me with consistent repro steps even, the answer I got was that it was something specific to Unity on Mac and not a priority to fix, which is why I didn't bother continuously sending crash logs.
For the extensions, the only common thread I have for now is a crash, variables in the inspector at the time, not being able to watch variables again (+ button / right click Add are disabled). Luckily or unluckily it hasn't happened that many times that I can narrow down repro steps, which is why I didn't see the point in filing an issue on github. I have a 'feeling' that on both occasions the crash happened while I was expanding a variable in the list and the debugger was working on showing the extended data. Since there's a known issue with LINQ and I use it fairly often, that could be part of the problem (last time I was for sure in a scope with a LINQ call that wasn't working 100% of the time, but I don't THINK I had a breakpoint in that line). If it's still helpful to log an issue with this little information, I'll be happy to do so. I think that is really unfortunate that a consistent crash with repro steps gets discarded like that, could I maybe have a link to the issue, if you still have it? If you and your colleagues are having this problem still I would like to help push for that.
If we want people to help us make our engine more stable we should be ready to accept the hard work that is involved with solving these issues. Otherwise we may not know how stable, or unstable, our product really is, because people will not report their problems. I really value all the feedback that you guys have given me here, it has highlighted multiple problems with the Visual Studio Code debugger. If you would, I would be happy if you added a bug report on GitHub, with any information you can give me. Logs, c# runtime version and so on.
I would be happy to help you pinpoint the problem.