This pull request reviews the Blueprints docs pages: - Build your first blueprint - How to load and run blueprints - Troubleshoot - What are blueprints - Index page Fixing typos, adding references to Playground CLI, and improving readability.
42 lines
2.3 KiB
Markdown
42 lines
2.3 KiB
Markdown
# Troubleshoot and debug Blueprints
|
||
|
||
When you build Blueprints, you might run into issues. Here are tips and tools to help you debug them:
|
||
|
||
## Review common gotchas
|
||
|
||
- Require `wp-load`: to run a WordPress PHP function using the `runPHP` step, you would need to require [wp-load.php](https://github.com/WordPress/WordPress/blob/master/wp-load.php). So, the value of the `code` key should start with `"<?php require_once('/wordpress/wp-load.php'); /* Your PHP code here */"`.
|
||
|
||
## Blueprints Builder
|
||
|
||
You can use an in-browser [Blueprints editor](https://playground.wordpress.net/builder/builder.html) to build, validate, and preview your Blueprints in the browser.
|
||
|
||
> [!CAUTION]
|
||
> The editor is currently under development, and the embedded Playground sometimes fails to load. If this happens, refresh the page. We are aware of this issue and are working to improve the experience.
|
||
|
||
## Check for errors in the browser console
|
||
|
||
If your Blueprint isn’t running as expected, open the browser developer tools to see if there are any errors.
|
||
|
||
To open the developer tools in Chrome, Firefox, Safari*, and Edge: press `Ctrl + Shift + I` on Windows/Linux or `Cmd + Option + I` on macOS.
|
||
|
||
> [!WARNING]
|
||
> If you haven't yet, enable the Develop menu: go to **Safari > Settings... > Advanced** and check **Show features for web developers**.
|
||
|
||
The developer tools window allows you to inspect network requests, view console logs, debug JavaScript, and examine the DOM and CSS styles applied to your webpage. This is crucial for diagnosing and fixing issues with Blueprints.
|
||
|
||
## Ask for help
|
||
|
||
The community is here to help! If you have questions or comments, [open a new issue](https://github.com/wordpress/blueprints/issues) in this repository. Remember to include the following details:
|
||
|
||
- The Blueprint you’re trying to run.
|
||
- The error message you’re seeing, if any.
|
||
- The full output from the browser developer tools.
|
||
- Any other relevant information that might help us understand the issue: OS, browser version, etc.
|
||
|
||
***
|
||
|
||
**Table of contents**
|
||
1. [What are Blueprints, and what can you do with them?](./what-are-blueprints-what-you-can-do-with-them.md)
|
||
2. [How to load and run Blueprints?](./how-to-load-run-blueprints.md)
|
||
3. [Build your first Blueprint](./build-your-first-blueprint.md)
|
||
4. 👉 Troubleshoot and debug Blueprints
|