0
\$\begingroup\$

Soon after I press the Play button, the Unity break button automatically gets activated: Unity gets into Pause mode:

enter image description here

I have attached the Unity debugger to my C# code, but Visual Studio doesn't break.

How could I find out the reason why Unity goes into Break mode?

Thank you!

Edit: Per request, here is the button before pressing Play:

enter image description here

And here is what the console looks like after the error occured:

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Show me what the button looks like before you press the play button \$\endgroup\$ Commented Jul 3, 2019 at 23:50
  • \$\begingroup\$ Can you search your project to find whether any of your scripts or imported assets/libraries are setting EditorApplication.isPaused? \$\endgroup\$ Commented Jul 4, 2019 at 2:33
  • \$\begingroup\$ @DMGregory I don't have that. \$\endgroup\$ Commented Jul 4, 2019 at 13:16

2 Answers 2

1
\$\begingroup\$

I had a Debug.Break(); statement in my code. Even though attached, the VS debugger didn't indicate where it stopped.

I'm not sure if that is bug. I was expecting VS to indicate where it stops if the debugger is attached.

I have asked the bug report team this question, and I will update my answer as soon as I hear back from them.

\$\endgroup\$
0
\$\begingroup\$

Try opening the console (bottom left). If the "pause on error" option is enabled and you get an error, it will pause the game. Maybe you had it on.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you, but it wasn't enabled. I have attached a screenshot to my posting. \$\endgroup\$ Commented Jul 3, 2019 at 23:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.