[GH-ISSUE #1050] Enhancement: Breakpoints #610

Closed
opened 2026-03-01 21:44:56 +03:00 by kerem · 6 comments
Owner

Originally created by @ben-albrecht on GitHub (Mar 16, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1050

Describe feature

I am not sure if this falls within the scope of the project, is already possible through other means, or is not feasible, but I wanted to capture the general sentiment in a feature request:

It would be really useful to have a way to connect to a workflow with an interactive shell at a designated breakpoint for debugging purposes. For example, a workflow fails at step N, so I set a breakpoint at step N-1, and run act which will follow the workflow until reaching step N-1 and then drop me into an interactive shell at that step.

Originally created by @ben-albrecht on GitHub (Mar 16, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1050 ## Describe feature I am not sure if this falls within the scope of the project, is already possible through other means, or is not feasible, but I wanted to capture the general sentiment in a feature request: It would be really useful to have a way to connect to a workflow with an interactive shell at a designated breakpoint for debugging purposes. For example, a workflow fails at step `N`, so I set a breakpoint at step `N-1`, and run `act` which will follow the workflow until reaching step `N-1` and then drop me into an interactive shell at that step.
kerem 2026-03-01 21:44:56 +03:00
Author
Owner

@lejtemxviw commented on GitHub (Jul 7, 2022):

If I understood how act works right (:-p), it starts a container when it tries to run your workflow, and it leaves the container up when executions encounters an error. However, I think it does run the clean up steps on workflow exit. Would it be enough for this if there was an option that got act to just quit on encountering an error, without running the cleanup steps, and still leaving the container up? Or pause with a "Hit enter to continue...." prompt, so that one can ssh into the still-running container separately, then come back and hit enter to let it finish running the cleanup steps?

<!-- gh-comment-id:1177054247 --> @lejtemxviw commented on GitHub (Jul 7, 2022): If I understood how act works right (:-p), it starts a container when it tries to run your workflow, and it leaves the container up when executions encounters an error. However, I think it does run the clean up steps on workflow exit. Would it be enough for this if there was an option that got act to just quit on encountering an error, without running the cleanup steps, and still leaving the container up? Or pause with a "Hit enter to continue...." prompt, so that one can ssh into the still-running container separately, then come back and hit enter to let it finish running the cleanup steps?
Author
Owner

@ben-albrecht commented on GitHub (Jul 9, 2022):

I am not familiar enough with act to know what the cleanup steps are doing, but that sounds like a possible way to approach this. Being able to access the container and any artifacts left behind after the error happened would be helpful.

<!-- gh-comment-id:1179590303 --> @ben-albrecht commented on GitHub (Jul 9, 2022): I am not familiar enough with act to know what the cleanup steps are doing, but that sounds like a possible way to approach this. Being able to access the container and any artifacts left behind after the error happened would be helpful.
Author
Owner

@catthehacker commented on GitHub (Jul 10, 2022):

Being able to access the container and any artifacts left behind after the error happened would be helpful.

That's already the default behaviour

<!-- gh-comment-id:1179634271 --> @catthehacker commented on GitHub (Jul 10, 2022): > Being able to access the container and any artifacts left behind after the error happened would be helpful. That's already the default behaviour
Author
Owner

@ben-albrecht commented on GitHub (Jul 11, 2022):

That's already the default behaviour

Oh cool, I suspected this might already be possible. @catthehacker (or anyone else) -- would you mind giving a basic example of how one would do this or point me to an example doc?

We can probably close the issue with that information provided here, in case anyone else stumbles across this issue looking for the same feature.

<!-- gh-comment-id:1180471564 --> @ben-albrecht commented on GitHub (Jul 11, 2022): >That's already the default behaviour Oh cool, I suspected this might already be possible. @catthehacker (or anyone else) -- would you mind giving a basic example of how one would do this or point me to an example doc? We can probably close the issue with that information provided here, in case anyone else stumbles across this issue looking for the same feature.
Author
Owner

@catthehacker commented on GitHub (Jul 11, 2022):

would you mind giving a basic example of how one would do this or point me to an example doc?

docker exec -ti <container> /bin/bash

<!-- gh-comment-id:1180543701 --> @catthehacker commented on GitHub (Jul 11, 2022): > would you mind giving a basic example of how one would do this or point me to an example doc? `docker exec -ti <container> /bin/bash`
Author
Owner

@dheerajbhaskar commented on GitHub (Jun 11, 2023):

I found this after a lot of trial and error:

How to stop the workflow at a particular step (especially when it's not failing. For say REPL style development of workflow)

  1. Comment out all the steps after the one you want to stop at. If want to stop at "step 3", comment out all the steps after the said "step 3"
  2. Run act with reuse option act -r.
  3. DONE. Act performed the steps, left the container running for you to inspect. Get a shell into the container and do your thing docker exec -it <container> /bin/bash

NOTE: Remember that with the -r option, act re-uses the container. Github does not re-use containers. So, be sure to test your workflows without the -r option.

<!-- gh-comment-id:1586154274 --> @dheerajbhaskar commented on GitHub (Jun 11, 2023): I found this after a lot of trial and error: ## How to stop the workflow at a particular step (especially when it's not failing. For say REPL style development of workflow) 1. Comment out all the steps after the one you want to stop at. If want to stop at "step 3", comment out all the steps after the said "step 3" 2. Run act with reuse option `act -r`. 3. DONE. Act performed the steps, left the container running for you to inspect. Get a shell into the container and do your thing `docker exec -it <container> /bin/bash` NOTE: Remember that with the `-r` option, act re-uses the container. Github does not re-use containers. So, be sure to test your workflows without the `-r` option.
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#610
No description provided.