--- title: hydrogen debug cpu description: >- 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](/docs/custom-storefronts/hydrogen/debugging/cpu-startup) 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](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-flame). api_name: shopify-cli source_url: html: 'https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-debug-cpu' md: 'https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-debug-cpu.md' --- # hydrogen debug cpucommand 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](https://shopify.dev/docs/custom-storefronts/hydrogen/debugging/cpu-startup) 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](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-flame). ## Flags The following flags are available for the `hydrogen debug cpu` command: * \--entry \ string env: SHOPIFY\_HYDROGEN\_FLAG\_ENTRY Entry file for the worker. Defaults to `./server`. * \--output \ string Specify a path to generate the profile file. Defaults to "startup.cpuprofile". * \--path \ string env: SHOPIFY\_HYDROGEN\_FLAG\_PATH The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run. ### Examples * #### hydrogen debug cpu ##### hydrogen debug cpu ```bash shopify hydrogen debug cpu [flags] ```