[Qt-creator] Can't debug on Mojave with QT Creator 4.9.1

Eike Ziller Eike.Ziller at qt.io
Fri May 31 12:00:35 CEST 2019

> On 31. May 2019, at 08:37, André Pönitz <apoenitz at t-online.de> wrote:
> On Thu, May 30, 2019 at 03:12:48PM -0700, Simon Gornall via Qt-creator wrote:
>> I can't seem to get the debugger to start on my Mac, installed using the Mac installer (open
>> source version), when I do click on Debug, it launches a terminal window, which then contains:
>> Last login: Thu May 30 12:46:31 on ttys019 source
>> /var/folders/ll/jqpkccpn1m91qf41447mdlyh0000gn/T/tmpXAK2Pt simon% source
>> /var/folders/ll/jqpkccpn1m91qf41447mdlyh0000gn/T/tmpXAK2Pt Badly placed ()'s.
> What is in this script and who calls that?

It is generated by Qt Creator’s openTerminal.py

We have to do some fancy stuff to get the run environment passed into the shell opened in Terminal.app by “Run in Terminal”.
Only tested with bash...

>> simon% If I edit that script (/var/folders/...) it seems to be a bash script, and my shell is
>> set to /bin/tcsh (for a variety of reasons). Is there some place I can set my shell variant in
>> QT Creator, and have Qt Creator write out something my shell will accept ?
>> I already tried
>> exec'ing /bin/bash before launching QT Creator from the commandline setting the environment
>> SHELL variable to /bin/bash launching the last line in the script (which seems to be what is
>> actually necessary) from the terminal window.  ... but no joy. Any other ideas ?

The problem is that the script is sourced in a new Terminal window, which first of all itself starts a shell. That uses the login shell as specified in the user’s login options. The SHELL variable from Qt Creator’s run configuration is not yet set at that moment - actually that is what the sourced script is doing.

> Do you need the terminal at all? If not try to de-select  [ ] Run in Terminal  in the Project settings
> Andre'
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator

Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

More information about the Qt-creator mailing list