Visit us on for Branding, Digital Marketing and Design Solutions.

Use Debug.Break() to pause the editor

By Neel Gajjar - Unity Developer In Unity Development

Use Debug.Break() in your code to pause the editor

Did you know that you can control the unity editor play state directly from your code?

Suppose, there is a moment where you want to pause the execution to check your object values. In this situation use Debug.Break().

Sample code :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DebugPauseScript : MonoBehaviour {

    public bool problem = false;

    void Update()


        if (problem) {

            Debug.Break ();




Leave us a comment