If you look at `Debug.log()` in the [official docs][1], it takes `context` as its second parameter, you can pass your `Gameobject` in that to know which object is calling the debug statement then call your `Debug.break()` to pause the scene.

> Debug.log("myMessage",myGameObject);
> 
> Debug.break();

 

[1]: https://docs.unity3d.com/ScriptReference/Debug.Log.html