Opened 3 years ago

Closed 3 years ago

#7551 closed enhancement (fixed)

RFE: Handle the args from PyCharm's debugger

Reported by: Zach Pearson Owned by: Zach Pearson
Priority: low Milestone: 1.6
Component: Build System Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

I've been experimenting with PyCharm and find that it greatly enhances the development experience. I'd like to make our project more compatible with IDE features when we have time to implement such functionality.

I can launch ChimeraX from PyCharm fine, and have scripts to reinstall bundles as needed before launching ChimeraX, which is the equiavalent of running make app-install in the terminal in the directory I'm working in.

Being able to run the debugger would be another great leap forward in disambiguating the environment during development. It's a much nicer experience than the command line pdb.

Below is the call PyCharm uses when it attempts to launch ChimeraX in debugging mode:

/path/to/ChimeraX/python3 -I /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --module --multiprocess --qt-support=auto --client 127.0.01 --port 50216 --file chimerax.core

which fails out on line 469 of open_command/cmd.py, in the FileInfo class's initializer.

IDE screenshot attached; ChimeraX seems to think that the address '127.0.0.1' is a file.

Attachments (1)

Screenshot 2022-09-02 at 12.48.25.png (1.9 MB ) - added by Zach Pearson 3 years ago.

Download all attachments as: .zip

Change History (5)

by Zach Pearson, 3 years ago

comment:1 by Zach Pearson, 3 years ago

Type: defectenhancement

comment:2 by Zach Pearson, 3 years ago

Since the debugger works up until we hit an error reprocessing arguments, a naive solution could be to ignore them.

comment:3 by Zach Pearson, 3 years ago

The GUI deals with spurious file drop events in MacOS, and calls a function (open_dropped_file) that needed a try-catch block. The function is found wrapped in a similar try-catch elsewhere; I just added it around the failing code path. ChimeraX can now be launched, paused, stepped through live, and generally debugged in PyCharm.

This commit fixed it.

comment:4 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.