Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Mystiq · Nov 01, 2016 at 11:20 AM · crashvisual studiodebugging

Visual Studio 2015 debugging unstable. VS attached

I've been using Unity for a few months now and it has been pretty stable, minus a rare few odd editor crashes. Within the past week, debugging using Visual Studio 2015 has become so unstable to the point where now it seems if I even look at the "Attach to Unity" button on VS2015 wrong it will crash the Unity editor.

Problem

It was okay for a good long time. Then starting this past Staurday, using "Attach to Unity" became unstable: running the game from the editor would usually crash Unity with the bug reporter if VS was attached. It seems based on time I (my own initialization code?). The game would run just fine without VS attached.

As of today, "Attach to Unity and Play" became as unstable and because it starts the game, the crash is more problematic.

I honestly don't know what prompted this to start. I suspect some code of mine but I do not know where to look because I don't know what would set the editor off like this.

Troubleshooting

I've already tried deleting the UnityAssemblies folder in my project Library folder. Didn't help.

I've also submitted multiple crash reports through the reporter but as right now I seem almost incapable of debugging through VS, I'm here.

It does work through MonoDevelop but I really prefer Visual Studio.

Quick Facts

  • Unity 5.4.2f2 Personal.

  • Unity Tools for VS 2015 2.3.0.

  • Visual Studio 2015 Professional Update 3 (14.0.25431.01) with .NET 4.6.01586.

  • My project isn't that large. It's just one scene with code ported from an older game of mine written in C++. The implementation isn't finished so it's not as large as the old C++ version, and that was a fairly small game still. There is no unsafe code in the Unity version. All existing code is in C#.

  • The game runs fine if I don't have VS attached to debug.

  • The last 3 times I pushed "Attach to Unity and Play", it starts. I trigger a breakpoint, hit Step Over and Unity throws up the "Unity Editor has stopped working" dialog. If I Step Into this code and run it that way it's okay but does stick for a good few seconds when it should finish immediately. (It certainly does in the C++ version or if I don't have VS attached.)

  • There is a bit of static initialization in some classes the above line of code hits. A few static dictionaries but they aren't large and number under 15.

  • As I write this, I was able to start the game, let it run for a bit then attach VS and Step Over worked.

  • But, when I stopped the game with VS still attached and hit Play on Unity, it crashed, this time with the Unity bug reporter.

  • I can near-consistently crash the editor by leaving VS attached and hitting Play on the editor.

This makes me want to go back to my own game engine, and I stopped because I was able to complete so much more in a short amount of time (it helps that it looks prettier).

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image petey123567 · Dec 17, 2016 at 03:49 AM 0
Share

I am having this exact same problem! Happens in simple projects and complex projects alike.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Mystiq · Dec 17, 2016 at 09:03 PM

Oops. Forgot about this. It's due to exception support being enabled in Unity Tools for Visual Studio. After submitting several reports, I received a reply stating that this is a known bug.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to have step by step debugging in Visual Studio? 3 Answers

Cant attach debugger | Compile Errors in VS but not in Unity? 0 Answers

Is there a known compatibility issue with Visual Studio Enterprise Edition? 1 Answer

What is the recommend way to debug an Editor crash? 1 Answer

Does Intellitrace support Unity3D? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges