This repository has been archived by the owner on Apr 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
PyCharm IDE
yaizar edited this page Apr 20, 2017
·
11 revisions
- Download PyCharm's community version here. Install following the instructions for your platform.
- Clone Scipion git repository in your machine:
git clone https://github.com/I2PC/scipion.git
- Create a new Scipion project (File -> New Project. Enter your Scipion directory in Location).
There is a couple of commands that we need to run before starting PyCharm in order to be able to debug and use the "Attach to local process" option. A handy way is to modify PyCharm's init script:
- Find PyCharm's init script
$ which charm
/usr/local/bin/charm
- Open the init script as root
$ sudo vim /usr/local/bin/charm
- In the function
def process_args(argv):
, add the code in bold. Remember to replace<your-scipion-home>
with the right path and save your changes:
... elif arg == 'merge' and i == 0: args.append(arg) elif arg == 'debug': os.system("export LD_LIBRARY_PATH=<your-scipion-home>/software/lib/") os.system("echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope") elif arg == '-l' or arg == '--line': ...
- Start pycharm from your terminal with your new debug option - will prompt you to enter your password.
$ charm debug
[sudo] password for <your-user>:
- Happy debugging! 👽