You can very easily get Xdebug remote debugging on the command line as well. No need for a browser. You simply do:
export XDEBUG_CONFIG="idekey=sangoku"
and then run the composer script. As long as you have xdebug.remote_enable set to 1 in php.ini, this will initiate a debugging request to an open IDE. Depending on your IDE, you might need to do something special though to allow this connection to come in.