So I'm opening a TCPListener on socket 8000. Debugging code, finding bugs, stopping the app and debugging again.

Somehow I'm causing a problem such that it's not closing the TCP port, and it's causing a major problem such that even after I stop my program and restart it the code to open the TCP port the app is still throwing an exception, and it keeps happening until I reboot.

It's going to be real hard to find the bug when I have to reboot each time to debug the app!

I used netstat -b and it does Not show port 8000 open.

Of course I can try changing the port each time I run the app... But I really want to know why the app is still throwing an exception on a fresh run and netstat doesn't show the port open?

Help. And Thanks!