I have followed to the letter instructions for setting up xdebug with Visual Studio Code: https://blogs.msdn.microsoft.com/nicktrog/2016/02/11/configuring-visual-studio-code-for-php-development/
So all config files, files, etc are installed and tested as working outside of PHP.
Currently I am running PHP using the built in server (php -S localhost:8000 -t).
This works fine and I can see output in my browser. Similarly within VS Code I can run my code fine by running Ctrl + Shift + B. It also works inside Eclipse after installing PDT plugin.
Using phpinfo() I can see that xdebug is there and working fine. However, when I 'listen for XDebug' (I have changed launch.json to use port 8000) or press F5 all that happens is my status bar turns orange, the debug pane shows nothing and the debug buttons show pause/stop and I have to click one of these to quit the program, i.e. it does nothing.
What am I doing wrong?