Ask Your Question
1

debugging a python script from terminal

asked 2022-04-02 09:17:10 -0500

piscvau's avatar

updated 2022-04-02 17:15:59 -0500

in Ubuntu 20.04 I want to lauch a python script from terminal window as sudo. I use wingdbstub and it starts OK. I would like the output and input (especially password inputs) to be done from the terminal window. in the debugger preferences. I clicked on the use external console . I added the exo-open --launch TerminalEmulator . Now I can start the program from the terminal window . At first break point I get into the wing debugger and the breakpoint works. But inside a subprocess.run, the debugger does not use the terminal window to ask for password. and keeps waiting for the password!....

edit retag flag offensive close merge delete

Comments

That's odd and sounds like it may be a bug. Does it work if you uncheck the Debugger > Advanced > Use sys.std Wrapper preference?

Wingware Support's avatar Wingware Support  ( 2022-04-06 08:04:52 -0500 )edit

Thanks for our quick response. I cannot try again right now because I modified my project structure and I am no longer able to launch the python script. I will come back later to this.

piscvau's avatar piscvau  ( 2022-04-07 05:50:34 -0500 )edit

yes it works if I unclick the sys.std wrapper

piscvau's avatar piscvau  ( 2022-04-08 13:45:52 -0500 )edit

well it works sometimes but is not stable

piscvau's avatar piscvau  ( 2022-04-08 15:52:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-08 14:40:07 -0500

Sounds like this is a bug that can be worked around by unchecking the Debugger > Advanced > Use sys.stdin Wrapper preference. I think the problem is that it is getting confused in the child processes about whether it's running in Wing's Debug I/O tool or an external console. Thanks for reporting this problem!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2022-04-02 09:17:10 -0500

Seen: 191 times

Last updated: Apr 11