#Debugging terminal without using dagger CLI

1 messages · Page 1 of 1 (latest)

tame wyvern
#

I'm using the SDK directly and I'm looking for a way for interactive debugging. I found that there's a terminal method available in v0.12 so I'm trying it out, a sample code look something like this:

from sys import stdout

import anyio
import dagger


async def ci():
    async with dagger.Connection(dagger.Config(log_output=stdout)) as client:
        ci = client.container().from_("alpine").terminal()
        await ci.stdout()


if __name__ == "__main__":
    anyio.run(ci)

When I added the terminal method, the pipeline fail with the attached failure log.
Is it possible to get the debug terminal to work in this case? Thanks

#

Debugging terminal without using dagger CLI

atomic trench
#

Try with dagger run python myprogram.py

tame wyvern
#

I haven't check out the changes for a long time now, so I just ran the old python myprogram.py, which I assume isn't what the terminal method was designed to work with.
Anyway I tried the dagger run -i python myprogram.py and it works now, thanks for the assist salute