Solenoid ON/OFF

I've been using this guide:

as my first arduino project.

After connecting everything, the solenoid "opens" but I've also been using the web editor.

and uploaded the code they provided but nothing happens, it still keeps on an "open" mode.

I have no idea how to debug this, and to see where the problem comes from?

How can I check that the cable of pin 9 is sending the right signals?

What solenoid are you using (datasheet)? What transistor are you using (datasheet)? How is the solenoid powered?

How can I check that the cable of pin 9 is sending the right signals?

Replace the solenoid with a LED (with current limit resistor) to see if pin 9 is working.

groundFungus:
What solenoid are you using (datasheet)? What transistor are you using (datasheet)? How is the solenoid powered?
Replace the solenoid with a LED (with current limit resistor) to see if pin 9 is working.

I'm using exactly the same solenoid & transistor from the tutorial.

Post a photo of your wiring so that we can see how the transistor is wired. The power transistor pinout (in the diagram) is base, collector, emitter. The pinout of a 2N3904 is emitter, base, collector.