Skip to content

Add silly debug flags for npm debugging - #221

Open
rollecode wants to merge 1 commit into
WordPress:masterfrom
rollecode:master
Open

Add silly debug flags for npm debugging#221
rollecode wants to merge 1 commit into
WordPress:masterfrom
rollecode:master

Conversation

@rollecode

Copy link
Copy Markdown

This adds verbose debug flags in case of npm commands hang or behave unexpectedly.

@pfefferle pfefferle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it configurable by supporting the env var WPT_DEBUG?

https://github.com/WordPress/phpunit-test-runner/blob/master/.env.default#L62

You see an example here:

* Determines if the debug mode is enabled based on the 'WPT_DEBUG' environment variable.

@mindctrl

Copy link
Copy Markdown

I wonder if we still need this since #222 was solved with #225? If we still want it, I like the idea of making it configurable via WPT_DEBUG like @pfefferle suggested.

@github-actions

github-actions Bot commented Dec 10, 2025

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: rollecode <rolle@git.wordpress.org>
Co-authored-by: pfefferle <pfefferle@git.wordpress.org>
Co-authored-by: mindctrl <mindctrl@git.wordpress.org>
Co-authored-by: kittenkamala <amykamala@git.wordpress.org>
Co-authored-by: ekamran <ekamran@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@kittenkamala

Copy link
Copy Markdown
Contributor

Okay, this needs further discussion.

  1. Is this still needed?
  2. Move forward with WPT_DEBUG?
  3. Needs someone to update the PR to use WPT_Debug instead of the -ddd flag

@kittenkamala kittenkamala moved this from In progress to In review in Hosting Team WCUS 2026 Aug 12, 2026
@ekamran ekamran self-assigned this Sep 9, 2026
@ekamran

ekamran commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Picking up the questions above:

  1. Still needed? The original hang in npm install gets stuck / hangs in reify:poly-fill-library #222 was fixed by a Node version bump in updated Node version to latest supported one #225, but that fixed only that incident. If npm hangs again there is still no output to diagnose it, so an opt-in verbose mode is still useful.

  2. WPT_DEBUG: agree. The runner already has WPT_DEBUG wired in, so the npm commands now add the verbose flag only when it is set. Default behavior stays the same.

  3. I opened Run npm verbosely when debug mode is enabled #340 with that approach, keeping credit to @rollecode for the original idea here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

6 participants