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

CodeEditors

-

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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.