Is there a way to see if your sensor is broken?

Hello, I am very new to sensors and Arduino in general.

I purchased a Sharp IR sensor (GP2Y0A21YK) and I am getting the same readings where I place the sensor or object to test the measurement, and also regardless of what code I use. My question is, is there an easy way to tell if you have a broken sensor? For instance, if I look under a camera, I am not seeing any purple light coming from the sensor.

Thank you!

Light should be visible by your cellphones camera (870nm)
Remenber the 10uF capacitor.
At 4 inches to white paper u should get an analog reading near 500.

Thank you for responding so quickly! I have been plugging the red wire into 5v, the black into ground, and the yellow into A0 on my Uno board. Is there an image of how this should look on the breadboard anywhere? (I haven't even been using a breadboard for this to this point.

I haven't even been using a breadboard for this to this point.

Good they are rubbish.

Sounds like you have wired it up correctly, however the one I have had a pin header on it not wires, from left to right these were Signal (to A0 ) , -ve, +ve.

If the reading is not changing then it is wired up wrong or broken. What is the reading by the way?

This is the schematic:-

sensor (11.8 KB)