Does Debug.Log only work once?

What I mean is that I am having a hard time getting this code to work, so I put in a Debug.Log to see if it is even being called. However, when I click it, it only Logs it once, and when I click it again, nothing happens… Does the Log only work once or is there something wrong. I have all the other code commented out so there is no reason that it should not work a second time.


if(Input.GetButtonDown("Switch Guns"))
		if(walkScript.currentGun == gameObject)
			Debug.Log("Pressed Q");
			//walkScript.currentGun = walkScript.secondaryGun;
			//walkScript.secondaryGun = gameObject;
			//walkScript.currentGun.GetComponent(GunScript).isHeld = true;
			//walkScript.currentGun.GetComponent(GunScript).carrying = false;
			//walkScript.secondaryGun.GetComponent(GunScript).isHeld = false;
			//walkScript.secondaryGun.GetComponent(GunScript).carrying = true;


Thanks! And if I did something stupid and obvious I am still learning programming. :stuck_out_tongue:

Nevermind this question