Opened 18 months ago
Closed 15 months ago
#15224 closed defect (fixed)
ChimeraX tries to open debugger arguments as if they were files
Reported by: | Zach Pearson | Owned by: | Zach Pearson |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: | Tom Goddard | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
When started with a debugger (at least on Mac), ChimeraX somehow gets the arguments to the debugger (-Xfrozen_modules=off, the path to debugpy) and attempts to open them as if they were drag-and-dropped files.
Change History (3)
comment:1 by , 18 months ago
Cc: | added |
---|
comment:2 by , 17 months ago
The simplest thing I can think of is to test whether the file actually exists -- frozen_modules=off
and chimerax.core
will not -- before trying to open the file in those event handlers. That cuts it down to /path/to/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/debugpy/launcher/../../debugpy
comment:3 by , 15 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This is mostly a bug in the debuggers/DAP implementations, where (in the case of emacs's DAP package) if no arguments are passed in the name of the buffer is given as an argument.
Debugpy does pass itself as an argument to ChimeraX and I've ignored that in gui.py here.
Word of warning on this one. On the Mac, command line arguments also show up as drop events, so to avoid opening files twice (but still opening legitimate drops correctly) there is some complicated interplay between the command-line argument processing and the handling of drop events (most of the latter of which is in ui.gui.event() and ui.gui.open_pending_files())