Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22528

Debugger fails to launch when alternate Python binary is on PATH

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 4.9.1
    • Debugger
    • macOS

    Description

      Note: seems very similar to https://bugreports.qt.io/browse/QTCREATORBUG-19612.

      When I attempt to attach the debugger to a running process through Qt Creator, the attempt to hang with the text "Setting up inferior..." displayed in the Debugger pane while the progress bar at the bottom right (Launching Debugger) is stuck.

      Opening the debug log, it's clear that lldb failed some initialization steps, leading to the sys module failing to import and hence all subsequent steps failing. (see attached)

      The issue seems identical to this:

      https://stackoverflow.com/questions/47658596/strange-mixing-of-system-homebrew-python-with-lldb

      where (evidently?) LLDB will look at the PATH when determining what Python to use + modules to load.

      While this isn't a Qt Creator issue per-se, it'd be nice if the error to initialize Qt's LLDB scripting bits were signaled a bit more clearly to the user. I'm not sure how Qt launches LLDB, but it might also be nice to have a similar workaround (unset the PATH when launching /usr/bin/lldb to avoid picking up an incorrect version of Python).

      As a side note, a workaround is to just remove the symlink at /usr/local/bin/python. I'm not sure if there's a less-obtrusive fix.

      Attachments

        1. qt-debugger.log
          6 kB
          Kevin Ushey
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            kevinushey Kevin Ushey
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes