You should be able to use the `@requires extension xdebug` annotation for this.