Pycharm : how-to launch for a standard terminal (to solve an issue with curses)

允我心安 提交于 2019-11-29 02:06:36

I solved the curses debugging problem by attaching the debugger to a process.

  • Start the program in a terminal
  • Pycharm -> Tools -> Attach to Process
  • Select my prog
  • Done

Trying to attach as non-root requires additional ptrace access rights.

Explained here: http://blog.mellenthin.de/archives/2010/10/18/gdb-attach-fails-with-ptrace-operation-not-permitted/#comment-141535

On my ubuntu machine: echo 0 > /proc/sys/kernel/yama/ptrace_scope (as root)

respectively set ptrace_scope to 0 in /etc/sysctl.d/10-ptrace.conf

  • Start PyCharm and make sure that ncurses is listed in File->Settings->Project Interpreter->Python Interpreter;
  • if you have 2.7 and 3.x interpreters installed, make sure that correct one(supporting ncurses) is selected as default for the project from which you launch your application;

I more than sure that you have both 2.7 and 3.x installed on your machine - I had most of the issues with pycharm for case where both Python's branch were installed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!