From 6a9969bc1ee1cdf5613192bbc68fabe9c788812b Mon Sep 17 00:00:00 2001 From: Brandon Payton Date: Wed, 5 Nov 2025 14:42:33 -0500 Subject: [PATCH] Make error logging and help text a bit clearer --- packages/playground/cli/src/run-cli.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/playground/cli/src/run-cli.ts b/packages/playground/cli/src/run-cli.ts index d74aad2b19..67af7faa01 100644 --- a/packages/playground/cli/src/run-cli.ts +++ b/packages/playground/cli/src/run-cli.ts @@ -449,7 +449,7 @@ export async function parseOptionsAndRunCLI() { currentError = currentError.cause as Error; } while (currentError instanceof Error); console.error( - '\x1b[1m' + messageChain.join(' caused by ') + '\x1b[0m' + '\x1b[1m' + messageChain.join(' caused by: ') + '\x1b[0m' ); } process.exit(1); @@ -713,19 +713,27 @@ export async function runCLI(args: RunCLIArgs): Promise { if (hasVSCode) { console.log(bold('VS Code / Cursor instructions:')); console.log( - ' 1. Open the Run and Debug panel on the left sidebar' + ' 1. Ensure you have installed an IDE extension for PHP Debugging' ); console.log( - ` 2. Select "${italic( + ` (The ${bold('PHP Debug')} extension by ${bold( + 'Xdebug' + )} has been a solid option)` + ); + console.log( + ' 2. Open the Run and Debug panel on the left sidebar' + ); + console.log( + ` 3. Select "${italic( IDEConfigName )}" from the dropdown` ); console.log(' 3. Click "start debugging"'); console.log( - ' 4. Set a breakpoint. For example, in .playground-xdebug-root/wordpress/index.php' + ' 5. Set a breakpoint. For example, in .playground-xdebug-root/wordpress/index.php' ); console.log( - ' 5. Visit Playground in your browser to hit the breakpoint' + ' 6. Visit Playground in your browser to hit the breakpoint' ); if (hasPhpStorm) { console.log('');