jataware / beaker-kernel

Contextually-aware notebooks with built-in AI assistant
https://jataware.github.io/beaker-kernel/
MIT License
2 stars 2 forks source link

Debug Support? #63

Open fivegrant opened 3 months ago

fivegrant commented 3 months ago

Is there an easy way to use pdb with Beaker? It might be nice to have a --debug flag. This is what happened when I hit a breakpoint. This is a very low priority issue, but I thought it was worth putting up here. There also may be an easy step I missed somehow in the steps below.

[I 2024-07-09 19:29:01.458 BeakerServerApp] Kernel started: 26942033-1ecc-4047-ada9-c57fd8144a6d

> /jupyter/beaker_kernel/contexts/biome/agent.py(97)query_page()
-> job_id = response.json()["job_id"]
(Pdb)
interact

adfs
quit
^C[I 2024-07-09 19:32:35.126 BeakerServerApp] interrupted

[I 2024-07-09 19:32:35.126 BeakerServerApp] Serving notebooks from local directory: /jupyter
    2 active kernels
    Jupyter Server 2.14.1 is running at:
        http://0.0.0.0:8888/
Shut down this Jupyter server (y/[n])? y
Shutting down...
Cleaning up...
[C 2024-07-09 19:32:35.376 BeakerServerApp] received signal 15, stopping
[I 2024-07-09 19:32:35.377 BeakerServerApp] Shutting down 5 extensions
[I 2024-07-09 19:32:35.377 BeakerServerApp] Shutting down 2 kernels
[I 2024-07-09 19:32:35.377 BeakerServerApp] Kernel shutdown: 26942033-1ecc-4047-ada9-c57fd8144a6d
[I 2024-07-09 19:32:35.377 BeakerServerApp] Kernel shutdown: feada862-b993-4d30-9236-3ecd4525d900

Stdin was working with the docker container as you can see with ^C successful shutting down Beaker (additionally, I could see the stdin across multiple terminals).

Steps to reproduce