[GH-ISSUE #1006] Enhancement: support for RUNNER_DEBUG environmental variable #590

Open
opened 2026-03-01 21:44:47 +03:00 by kerem · 10 comments
Owner

Originally created by @kanadgupta on GitHub (Feb 17, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1006

Hello, thanks for this fantastic tool!

The way that I understand it, adding a repository secret called ACTIONS_STEP_DEBUG and setting it to true should enable step debug logging.

Per https://github.com/actions/runner/pull/253 and these docs, it appears that the RUNNER_DEBUG environmental variable is set to 1 when step debug logging is enabled, but I'm not seeing that environmental variable when running this command:

act -s ACTIONS_STEP_DEBUG=true

I haven't seen any issues or PRs related to this so I'm not sure if this is supported already. Please let me know if there's any other information I can provide. Thank you again!

Originally created by @kanadgupta on GitHub (Feb 17, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1006 Hello, thanks for this fantastic tool! The way that I understand it, adding a repository secret called `ACTIONS_STEP_DEBUG` and setting it to `true` [should enable step debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging). Per https://github.com/actions/runner/pull/253 and [these docs](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#using-workflow-commands-to-access-toolkit-functions), it appears that the `RUNNER_DEBUG` environmental variable is set to `1` when step debug logging is enabled, but I'm not seeing that environmental variable when running this command: ```sh act -s ACTIONS_STEP_DEBUG=true ``` I haven't seen any issues or PRs related to this so I'm not sure if this is supported already. Please let me know if there's any other information I can provide. Thank you again!
Author
Owner

@catthehacker commented on GitHub (Feb 24, 2022):

This is currently handled by --verbose flag, do we need to add it as env variable? I don't think it should be added, but we should have better log output parity with GHA runner.

<!-- gh-comment-id:1050090351 --> @catthehacker commented on GitHub (Feb 24, 2022): This is currently handled by `--verbose` flag, do we need to add it as env variable? I don't think it should be added, but we should have better log output parity with GHA runner.
Author
Owner

@kanadgupta commented on GitHub (Feb 24, 2022):

Just to clarify, it's not solely for my own action debugging purposes. I'm adding step debug logging support to an action and I want to test application logic that only runs if step debug logging is enabled.

You can see an example of this in GitHub's docs for @action/core, which is their package for writing JS-based actions:

if (core.isDebug()) {
  // curl -v https://github.com
} else {
  // curl https://github.com
}

<!-- gh-comment-id:1050230311 --> @kanadgupta commented on GitHub (Feb 24, 2022): Just to clarify, it's not solely for my own action debugging purposes. I'm adding [step debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging) support to an action and I want to test application logic that only runs if step debug logging is enabled. You can see an example of this [in GitHub's docs for `@action/core`](https://github.com/actions/toolkit/tree/main/packages/core#logging), which is their package for writing JS-based actions: ```js if (core.isDebug()) { // curl -v https://github.com } else { // curl https://github.com } ```
Author
Owner

@catthehacker commented on GitHub (Feb 24, 2022):

I know what you are talking about and it doesn't change what I said

<!-- gh-comment-id:1050232699 --> @catthehacker commented on GitHub (Feb 24, 2022): I know what you are talking about and it doesn't change what I said
Author
Owner

@kanadgupta commented on GitHub (Feb 24, 2022):

Got it! I personally see the value in having that env variable parity, but totally understand if this isn't something you plan on taking on. Appreciate this tool and the work you've put in regardless!

<!-- gh-comment-id:1050238862 --> @kanadgupta commented on GitHub (Feb 24, 2022): Got it! I personally see the value in having that env variable parity, but totally understand if this isn't something you plan on taking on. Appreciate this tool and the work you've put in regardless!
Author
Owner

@devgioele commented on GitHub (May 26, 2022):

It looks like using --verbose does not make core.isDebug() evalute to true.
Am I missing something? How are we supposed to enable debugging as if ACTIONS_STEP_DEBUG was true?

<!-- gh-comment-id:1138688762 --> @devgioele commented on GitHub (May 26, 2022): It looks like using `--verbose` does not make `core.isDebug()` evalute to `true`. Am I missing something? How are we supposed to enable debugging as if `ACTIONS_STEP_DEBUG` was `true`?
Author
Owner

@catthehacker commented on GitHub (May 26, 2022):

How are we supposed to enable debugging as if ACTIONS_STEP_DEBUG was true?

You can't, we are not the same thing as GHA runner, so naturally we don't have same feature set and log output

<!-- gh-comment-id:1138837029 --> @catthehacker commented on GitHub (May 26, 2022): > How are we supposed to enable debugging as if `ACTIONS_STEP_DEBUG` was `true`? You can't, we are not the same thing as GHA runner, so naturally we don't have same feature set and log output
Author
Owner

@devgioele commented on GitHub (May 27, 2022):

Does the architecture of act fundamentally prevent this or could I make a PR that implements it?

<!-- gh-comment-id:1139438740 --> @devgioele commented on GitHub (May 27, 2022): Does the architecture of act fundamentally prevent this or could I make a PR that implements it?
Author
Owner

@catthehacker commented on GitHub (May 27, 2022):

I doubt it's impossible to implement but it will need to be tested properly.

<!-- gh-comment-id:1139489648 --> @catthehacker commented on GitHub (May 27, 2022): I doubt it's impossible to implement but it will need to be tested properly.
Author
Owner

@mjpieters commented on GitHub (Apr 5, 2023):

As a workaround just set the RUNNER_DEBUG environment variable manually with --env RUNNER_DEBUG=1.

<!-- gh-comment-id:1497101100 --> @mjpieters commented on GitHub (Apr 5, 2023): As a workaround just set the `RUNNER_DEBUG` environment variable manually with `--env RUNNER_DEBUG=1`.
Author
Owner

@mcascone commented on GitHub (Oct 11, 2024):

Is there a way to DISABLE debug mode?

<!-- gh-comment-id:2408065359 --> @mcascone commented on GitHub (Oct 11, 2024): Is there a way to DISABLE debug mode?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#590
No description provided.