Debug mode → XDEBUG_MODE=debug. Your IDE listens on port 9003. From Docker use host.docker.internal.
You can keep Xdebug installed but quiet: trigger / on-demand instead of constant overhead.
Enable it from the Tools tab or CLI:
macstack xdebug set --enabled true
PHP console: php -r in the web container (Docker) or managed PHP (Native).