Skip to content

Provide a better Debugging Experience #826

Closed

Description

@aluzzardi

When a config works, it's awesome. When it doesn't, the troubleshooting experience is far from perfect.

Partial Run for Debugging

Dagger can only run all or nothing: when one component of the config misbehaves, there's no way to make some tweaks and re-run only that part.

The current experience requires a lot of trial and error: comment out everything but the component you're debugging, get errors about unused imports, fix those, then get errors about undefined identifiers (the dependencies of the component we want to run), uncomment those dependencies, and continue so recursively.

This is particularly frustrating when writing a configuration.

Possible solution: allow running a single component and its dependencies (e.g. dagger up --target app)

Exporting Artifacts

It would be great to be able to download an artifact from a config in order to inspect it.

For instance, if we want to troubleshoot a build output, right now the main approach is to add an intermediary step that mounts the build and executes a ls or similar, Having something like dagger download would make that much smoother.

Interactive Debugging

When commands fail, we can only rely on the logs to debug. Typically to debug we add some extra debugging commands and run dagger up again, until we succeed.

It would be really awesome to execute commands in any pipeline:

$ dagger exec "<cuepath>" -- ls -l
$ dagger exec -it "<cuepath>" /bin/sh
# ls -l /src

This needs some more design: at which step of the pipeline does the command will be executed?

Maybe we could provide an interactive debugger that goes step to step inside a pipeline and allows executing commands at any point.

Activity

  1. shykes commented on Apr 8, 2022

    @shykes
    Contributor

    On the one hand, we still want better debugging (very badly). On the other hand, our implementation has changed a lot since you wrote this @aluzzardi . Do you want to 1) keep open as-is, 2) edit the issue text, 3) close?

  2. jpadams commented on Apr 14, 2022

    @jpadams
    Contributor

    I found myself wanting debugging at several levels.

    Figuring out what is happening with a cue eval or dagger do hang with no logs/error output, for example.

    Figuring out what is happening at a some point in an action during a dagger do: #2197

  3. mircubed commented on Jun 1, 2022

    @mircubed
    Contributor

    @aluzzardi should we reassign this to @dolanor since it falls under error message improvements? If not, can you provide an update?

  4. mircubed commented on Jun 1, 2022

    @mircubed
    Contributor

    Or can we close this since our Dagger run view in the UI should help with this? @aluzzardi

  5. mircubed commented on Dec 21, 2022

    @mircubed
    Contributor

    Closing this since a lot has changed since this issue was created

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions