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

Simon Gornall simon.gornall at mac.com
Fri May 31 16:01:40 CEST 2019



> On 31 May 2019, at 03:00, Eike Ziller <Eike.Ziller at qt.io> wrote:
> 
> 
> 
>> 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
> https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/share/qtcreator/scripts/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…


Oh :(

I don’t suppose there’s any chance of supporting more shells (popular ones like [t]csh, zsh etc.) ?

> 
>> 
>>> 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

I don’t, and I’d be happy to try that, but [*blush*] I … can’t find that.

 - I’ve looked in Projects [icon on the left] -> Project Settings, but it only has options for ‘Editor’, ‘Code Style’, ‘Dependencies’, ‘Clang Code Model’ and ‘Clang tools’ (which is just about suppressed diagnostics)
 - I’ve looked in Preferences -> ‘Build & Run’
 - I’ve looked in Preferences -> ‘C++’
 - I’ve looked in Preferences -> Debugger
 - I’ve clicked on the Debug icon (on the left) and scanned for options (can’t see any)
 - I’ve gone through the ’Tools’ menu, and nothing springs out at me.
 - I looked in Preferences -> Kits -> (click on "Desktop Qt 5.12.3 clang 64-bit”)

In desperation, and as an absolute last resort, I *even* looked in the help (!) [grin] (but still couldn’t find anything)

So where is it ? Any hints ?

Cheers
	Simon

>> 
>> 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
> http://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