Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for debugger to attach in Runner.Worker process #1101

Merged
merged 6 commits into from
May 27, 2021

Conversation

fhammerl
Copy link
Contributor

@fhammerl fhammerl commented May 20, 2021

This PR stalls the Runner.Worker process until a debugger is connected if GITHUB_ACTIONS_RUNNER_ATTACH_DEBUGGER environment variable is set to true.

Related to #1023

Only if GITHUB_ACTIONS_RUNNER_ATTACH_DEBUGGER is set
@fhammerl fhammerl requested a review from a team as a code owner May 20, 2021 12:32
private static async Task WaitForDebugger(Tracing trace)
{
trace.Info($"Waiting for a debugger to be attached. Edit the 'GITHUB_ACTIONS_RUNNER_ATTACH_DEBUGGER' environment variable to toggle this feature.");
while (!Debugger.IsAttached)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we wait for some max time in case you don't attach a debugger

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'm thinking 30s would probably be appropriate.

@fhammerl fhammerl merged commit 93ec16e into actions:main May 27, 2021
hydai added a commit to WasmEdge/WasmEdge that referenced this pull request Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants