#[SOLVED] Interactive terminal (shell) for debugging (not dagger module)

1 messages · Page 1 of 1 (latest)

earnest lynx
#

Hi, I have a Golang stand-alone project which is using Dagger under the hood. And I would like to use the interactive terminal for occasional debugging in case of error.

However it seems that interactive terminal is only supported in dagger modules. Unfortunately my golang project is not a dagger module. Is there a way to still use this?

For a while I was using a SSH workaround - in case of error, convert the container into service and open SSH server, to which I can connect and I can debug whatever is wrong.

vital tapir
#

Should work with dagger run. Are you using it?

earnest lynx
#

No, because it is not dagger module 😦

vital tapir
#

dagger run doesn't work with modules. It's for custom scripts. Like dagger run go run script.go.

earnest lynx
#

oh

vital tapir
earnest lynx
#

OK, I see. This seems like exactly what I was looking for. Thanks!

#

Is there a way to get around the dagger run?
It is rather cumbersome to call dagger run --interactive /usr/bin/my-project --arg1 --arg2 . I would be great to somehow hide the dagger run --interactive into the project itself.

solar basin
earnest lynx
#

I think that os/exec and child-process would be kinda cursed.

#

But should work.

#

Might be too cursed ...

#

Anyway, thank you a lot for these tips! This is great! I can now drop my SSH workaround that I made in the ancient times before v0.12 came around.