Search Issue Tracker
Not Reproducible
Votes
0
Found in
5.4.0b8
Issue ID
775552
Regression
No
Unity Play mode freezes when debugging the project using a breakpoint and attaching a MonoDevelop script to the Unity process
Unity Play mode freezes when debugging the project by using a breakpoint and attaching a MonoDevelop script to the Unity process. Stepping Over/Out does not exit the debugging mode.
1. What happened
Made a simple button with a script attached that prints a line of text when pressed. The program works fine, unless in MonoDevelop a breakpoint is created and the script is attached via the debugger to the process. Then upon pressing the in-game "Button" in Play mode MonoDevelop pauses Unity and goes into debugging mode. However, it is then not possible to exit debugging mode (Stepping Over / Stepping Out) and the only way to unfreeze Unity is to deattach the script.
Expected result: Stepping Over/Out should exit the process cleanly and let Unity continue running afterwards.
Note: In Unity 5.4 if the above mentioned procedure is done, then the script is deattached (so Unity can continue to run), if the Play mode is stopped, the console gives this warning: "Managed threads (1) are still running after exiting play mode. Use EditorApplication.playmodeStateChanged to stop threads when exiting play mode."
Unity 5.3 behaves in the same buggy way but gives no warning after deattaching the script and exiting the Play mode.
2. How we can reproduce it using the example you attached
* Open the attached project;
* Open the Hello.cs script in MonoDevelop;
* Create a breakpoint in line 16 and attach the script to Unity process;
* Start the Play mode in Unity and press the "Button" in the Game screen;
* Once taken to MonoDevelop, Step Out (can be done several times) of the method and observe Unity not continuing to work.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- SpeedTree does not move when using WindZone
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
Add comment