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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment