Ask Your Question

What does debug process is busy mean?

asked 2021-04-05 20:56:45 -0500

wpCurious's avatar

updated 2021-04-06 08:08:39 -0500


After running some code in the Python debugger


, and typing a statement at the >>> prompt:

 a = prolog.Term("mother(alice,bill)")

Wing won't continue, and returns an error:

 Cannot execute: debug process is busy

Note that the code was written for version 2, so some changes had to be made, like using parenthesses with print. So the current code module is not exactly the same as the one above.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2021-04-06 08:05:44 -0500

I think the code "procFile (sys.stdin,'? ')" in main() in is reading from stdin, and thus you are trying to enter code into the Debug Console while you are not at a breakpoint or exception. If you want to use this code interactively, you may want to set a breakpoint on the first line of main() and run to that, then enter your interactive code.

edit flag offensive delete link more


Thanks, I gave it a try. But since the class hasn't been constructed yet when I try to generate an instance of it with

 a = prolog.Term("mother(alice,bill)")

, it generates an error

 Traceback (most recent call last):
   Debug Console, prompt 1, line 1
 builtins.NameError: name 'prolog' is not defined

It looks like the module also accepts a file, but I tried giving it a file as well. Same problem.

wpCurious's avatar wpCurious  ( 2021-04-06 09:22:17 -0500 )edit

If you debug/run the file then the 'if __name__ == "__main__"' clause at the bottom will be true and it'll invoke main() right away. Unless that reaches an exception or breakpoint the Debug Console cannot invoke code because it's run in the context of the current debug stack frame. If instead you do 'import prolog1' (for example in Wing's Python Shell; this assumes prolog1 is on your Python Path) then the module will be loaded so you can do things like prolog.Term("whatever"). Or set a breakpoint on the last line of the file, debug it, and then work in the Debug Console. The latter is what I would tend towards doing to work interactively with this.

Wingware Support's avatar Wingware Support  ( 2021-04-06 09:49:18 -0500 )edit

answered 2021-04-06 09:27:30 -0500

wpCurious's avatar

I think I need to play with this a bit, and trace through the procfile routine. It's possible that I'm misunderstanding how the module is supposed to work.

I'll return here and post results, in case there are any future interested parties.

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



Asked: 2021-04-05 20:56:45 -0500

Seen: 270 times

Last updated: May 18 '21