Finalise the Xdebug initialisation

This fixes issue #13. It might not be the prettiest solution but we can revisit it later.