hydrogen debug cpu
This command works with Hydrogen 2026-04 and earlier. Hydrogen 2026-10 doesn't support the command. In a Hydrogen 2026-10 project, use your framework's commands or the @shopify/hydrogen commands instead. To check which commands Hydrogen 2026-10 supports, refer to Shopify CLI Hydrogen commands.
This command works with Hydrogen 2026-04 and earlier. Hydrogen 2026-10 doesn't support the command. In a Hydrogen 2026-10 project, use your framework's commands or the @shopify/hydrogen commands instead. To check which commands Hydrogen 2026-10 supports, refer to Shopify CLI Hydrogen commands.
Builds the app and runs the resulting code to profile the server startup time, watching for changes. This command can be used to debug slow app startup times that cause failed deployments in Oxygen.
The profiling results are written to a .cpuprofile file that can be viewed with certain tools such as Flame Chart Visualizer for Visual Studio Code.
Anchor to flagsFlags
The following flags are available for the hydrogen debug cpu command:
- Anchor to --entry <value>--entry <value>--entry <value>stringstringenv: SHOPIFY_HYDROGEN_FLAG_ENTRYenv: SHOPIFY_HYDROGEN_FLAG_ENTRY
Entry file for the worker. Defaults to
./server.- Anchor to --json-schema--json-schema--json-schemaenv: SHOPIFY_FLAG_JSON_SCHEMAenv: SHOPIFY_FLAG_JSON_SCHEMA
Print the command's JSON schemas.
- Anchor to --output <value>--output <value>--output <value>stringstring
Specify a path to generate the profile file. Defaults to "startup.cpuprofile".
- Anchor to --path <value>--path <value>--path <value>stringstringenv: SHOPIFY_HYDROGEN_FLAG_PATHenv: SHOPIFY_HYDROGEN_FLAG_PATH
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
hydrogen debug cpu
Examples
Hydrogen debug cpu
hydrogen debug cpu
shopify hydrogen debug cpu [flags]