modd icon indicating copy to clipboard operation
modd copied to clipboard

support Python debugger

Open mozartilize opened this issue 6 years ago • 5 comments

running with daemon and set breakpoint via import pdb; pdb.set_trace()

program can't pause on breakpoint and just restarts

mozartilize avatar Dec 08 '19 07:12 mozartilize

Can be reproduced with:

{
    prep: python -c "import pdb; pdb.set_trace()"
}

I would guess this might be because stdin isn't an interactive tty for the python process.

@mozartilize were you expecting a interactive prompt or how some other behaviour?

wader avatar Dec 08 '19 11:12 wader

maybe related to this https://stackoverflow.com/a/18432456

mozartilize avatar Dec 09 '19 10:12 mozartilize

@wader sorry, I dont get it. Interactive prompt only accessed if it can pause on breakpoint

mozartilize avatar Dec 09 '19 10:12 mozartilize

Ah i was a bit unclear. I just noticed that if i run the command without modd i get a prompt:

$ python -c "import pdb; pdb.set_trace()"
--Return--
> <string>(1)<module>()->None
(Pdb)

wader avatar Dec 09 '19 12:12 wader

it's debug interface, you can go to python interpreter by typing interact and hit enter Selection_060

mozartilize avatar Dec 10 '19 11:12 mozartilize