How to debug a possible tag detection bug

I have a tag called NPC, which is triggering ok in editor, but not in build. TO debug I am using

function OnTriggerEnter (other: Collider) {
		Debug.Log(other.gameObject.tag.name);
}

But for both player and NPC its returning null

Whats the right syntax to “get” the tag. CompareTag is not going to cut it for detecting the bug fix, because its returning true, but then behaving otherwise.Thanks

PS this topic thing I have to fill out in order to post sucks dogs balls. I can never get it to recognise anything logical

Below snippet(C#) will definitely work for detecting tag name.Make sure that the other object should have rigidbody attached and the object for which collision detection script attached must have “IsTrigger” checked under collider component.

  void OnTriggerEnter(Collider col)
    	{
    	print(col.gameObject.tag);
    	}

Hope this may help you
Nsks