Passing keyboard input to debugged Python code in Aptana

I am working on some Python code designed to run on a Windows 7 console (AKA Command Prompt). The program is able to accept user keyboard input by running a dedicated thread that calls msvcrt.getch()which is MC VC ++.

I am having problems debugging this code on Aptana, because when I run the debugger, the keyboard input is redirected to the IDE and does not "reach" the program.

The scenario is as follows:

  • Run the code under the debugger (Application Explorer -> right-click main.py -> Debug As -> Python Run)
  • "Aptana Scripting Console" starts showing the stdout program.
  • In the scripting console, I hit user input, but instead of being passed to the running program, it is intercepted by the IDE to allow me to interactively evaluate Python statements with an accessible program context (a big feature in most cases)

My question is: is it possible to circumvent or temporarily disable this behavior so that keystrokes are passed to the debbuged application?

+3
source share

All Articles