Skip to content

Interactive debugger #4463

Closed
Closed

Description

@shykes

Note: this is implemented as of Dagger 0.12

It would be amazing to have a way to add "breakpoints" to the DAG, and interactively inspect the state at the given point (via an interactive shell for example).

This has been requested and proposed many times, and we even saw a proof-of-concept by @aluzzardi :) This issue is for tracking and lobbying purposes 😄

Activity

  1. schlapzz commented on Mar 10, 2023

    @schlapzz
    Contributor

    +1 for this feature. In my experience this would be extrem helpful to debug problems "beyond" the SDKs. I found myself often in the situation when I wish I have the option to inspect the file system after a new directory mount or command execution.

  2. jpadams commented on Jun 2, 2023

    @jpadams
    Contributor

    From user in Discord:
    https://discord.com/channels/707636530424053791/708371226174685314/1114265034009346108

    what is the easiest (shortest? 😁) way from a failed step in a pipeline, to debugging it interactively in the same environment, so you could run commands/inspect filesystem and such? — basically, mimicking targets in a dockerfile, and being able to exec into the failed container state? — preferably using go sdk — but any pointers appreciated, i’ve been mucking with nsenter from the buildkit host — but hoping for something along the lines of earthly -i if possible 😄

  3. jpadams commented on Jun 2, 2023

    @jpadams
    Contributor

    From discord:
    https://discord.com/channels/707636530424053791/708371226174685314/1071139783037952010

    Hey yall - trying to dig through the discord here - wondering about debugging containers in intermediate steps. Is this possible?

    I think it had been discussed a while back. I've been pinned on an older version of dagger for a little bit, curious about developments since then

    edit: Just found #4463 - I'll follow for updates there.

  4. schlapzz commented on Jun 4, 2023

    @schlapzz
    Contributor

    I think a good starting point would be to implement the --invoke=on-error from Buildkit.
    This would help at least to debug failing builds.

    docker/buildx#1640

  5. verdverm commented on Jun 30, 2023

    @verdverm
    Contributor

    This would also be useful in a non-debugging step, where I may want to create ephemeral, dagger powered environments. In other words, the end of a pipeline can be an interactive session, or maybe an intermediate stage where the user has to do something, and when they are done, the pipeline continues.

  6. helderco commented on Jul 29, 2023

    @helderco
    Contributor

    From Discord:

    Screenshot 2023-07-29 at 16 33 32
  7. robertu94 commented on Oct 27, 2023

    @robertu94

    This would be a great feature for some use cases we deal with. Specifically we have builds that we do seldomly that take hours each time. If these fail in a container the current best that we can do is experience the failure, start a new interactive container instance on the previous image, and run the command again and wait for another several hours until it fails again so we can debug interactively.

  8. robertu94 commented on Oct 27, 2023

    @robertu94

    Another separate cool use case is if you could look at diffs between images interactively or iteratively/interactively walk the image history to consider all versions of a file in all the images produced by a pipeline for debugging.

  9. suhlig commented on Nov 4, 2023

    @suhlig

    Coming from a Concourse background, where fly intercept (gives you an interactive shell in a running or failed container) is one of the commands most praised by developers: YES PLEASE.

  10. rawkode commented on Sep 13, 2024

    @rawkode
    Contributor

    Just came to open an issue for a withBreapoint() method on a Container.

    Yes, please!

  11. shykes commented on Sep 14, 2024

    @shykes
    ContributorAuthor

    @rawkode have you tried Container.terminal()?

  12. rawkode commented on Sep 14, 2024

    @rawkode
    Contributor

    Yes, the with breakpoint idea came to me after having to continually edit functions to return a container and commenting out code to debug.

    withBreakpoint() could be a function that is a noop most of the time, except when we enable them with Dagger call. It would simplify getting into a terminal without juggling our code.

  13. rawkode commented on Sep 14, 2024

    @rawkode
    Contributor

    Oh, wait. Are you saying I can add .terminal to my code and it works? No more commenting 😮

  14. shykes commented on Sep 14, 2024

    @shykes
    ContributorAuthor

    Oh, wait. Are you saying I can add .terminal to my code and it works? No more commenting 😮

    yes :) @aluzzardi was also tired of having to do what you described, and took matters in his own hands 💪

  15. shykes commented on Sep 14, 2024

    @shykes
    ContributorAuthor

    @rawkode bonus you can also do Directory.terminal()

  16. rawkode commented on Sep 14, 2024

    @rawkode
    Contributor

    Y'all are too good to us.

    Love it!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions