You don't run Wamp on port 9000: it's NetBeans that runs on port 9000!
Your debug client (NetBeans, in this case) needs to listen for incoming connections so Xdebug is able to establish a connection and send the apporpriate info. Please note that there're two requests involved:
- Someone (possibly NetBeans) connects to the web server to request the HTML document and start a debug session.
- Xdebug connects to whoever requested the debug session (NetBeans) and sends some XML with variables and other debug info.
Details can vary depending on your settings but this is the general idea.
The port you choose is irrelevant as far as:
- It's available (no other app is using it) at this moment.
- It's reachable from the web server (no firewall / router issues).