@wordpress/env 4.2.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -51,7 +51,7 @@ Then modify your package.json and add an extra command to npm `scripts` (https:/
51
51
  When installing `wp-env` in this way, all `wp-env` commands detailed in these docs must be prefixed with `npm run`, for example:
52
52
 
53
53
  ```sh
54
- # You must add another dash to pass the "update" flag to wp-env
54
+ # You must add another double dash to pass the "update" flag to wp-env
55
55
  $ npm run wp-env start -- --update
56
56
  ```
57
57
 
@@ -203,6 +203,14 @@ wp-env start
203
203
  wp-env start --xdebug=profile,trace,debug
204
204
  ```
205
205
 
206
+ When you're running `wp-env` using `npm run`, like when working in the Gutenberg repo or when having `wp-env` as a local project dependency, don't forget to add an extra double dash before the `--xdebug` command:
207
+
208
+ ```sh
209
+ npm run wp-env start -- --xdebug
210
+ ```
211
+
212
+ If you forget about that, the `--xdebug` parameter will be passed to NPM instead of the `wp-env start` command and it will be ignored.
213
+
206
214
  You can see a reference on each of the Xdebug modes and what they do in the [Xdebug documentation](https://xdebug.org/docs/all_settings#mode).
207
215
 
208
216
  _Since we are only installing Xdebug 3, Xdebug is only supported for PHP versions greater than or equal to 7.2 (the default). Xdebug won't be installed if `phpVersion` is set to a legacy version._
@@ -225,6 +233,8 @@ You should only have to translate `port` and `pathMappings` to the format used b
225
233
  }
226
234
  ```
227
235
 
236
+ After you create a `.vscode/launch.json` file in your repository, you probably want to add it to your [global gitignore file](https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer) so that it stays private for you and is not committed to the repository.
237
+
228
238
  Once your IDEs Xdebug settings have been enabled, you should just have to launch the debugger, put a breakpoint on any line of PHP code, and then refresh your browser!
229
239
 
230
240
  Here is a summary:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/env",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "A zero-config, self contained local WordPress environment for development and testing.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -51,5 +51,5 @@
51
51
  "scripts": {
52
52
  "test": "echo \"Error: run tests from root\" && exit 1"
53
53
  },
54
- "gitHead": "2e4922861e49f5a090f9dc52056165092cfba163"
54
+ "gitHead": "4566ac290359553d04de4eb574545309343f790b"
55
55
  }