Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MacOS Terminal doesnt show in-/output when debugging
Forum Updated to NodeBB v4.3 + New Features

MacOS Terminal doesnt show in-/output when debugging

Scheduled Pinned Locked Moved Unsolved General and Desktop
18 Posts 3 Posters 1.1k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    slepp
    wrote on last edited by
    #3

    Hi! Thank you very much for your reply!

    First things first, here is the code i was using (even if I think the code is not the problem as terminal shows in-/output if i run the programm):

    #include <iostream>
    using namespace std;
    
    int main(void)
    {
        //define variables
        int i = 0;
        int length, volume, surface, square;
    
        //user input
        cout << "Geben Sie eine ganze positive Zahl ein!" <<endl;
        cin >> i;
    
        //calculation
        length = i;
        square = length*length;
        surface = 6 * square;
        volume = square * length;
    
        //output
        cout << "Oberflaeche:" << surface <<endl;
        cout << "Volumen:" << volume <<endl;
    
        return 0;
    }
    
    

    As my instructor told me, I have selected "Run in Terminal" in the project settings / run.
    Therefore my terminal opens as soon as i click on "start debugging" but nothing happens in there.
    I hope that answers your question? Do you have any tips how i can solve this?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      You misunderstood my question: what happens if you start Terminal manually and do the debugging directly from there ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        slepp
        wrote on last edited by
        #5

        I have never tried it and to be honest i dont know how this works as i justed started a week ago.
        Is there any manual / guidance i can follow and try?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Apple has you covered here.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • S Offline
            S Offline
            slepp
            wrote on last edited by
            #7
            sven@Svens-MBP Desktop % $lldb /Users/sven/PAD1_Praktikum1_Aufgabe1/PAD1_Praktikum1_Aufgabe1
            Geben Sie eine ganze positive Zahl ein!
            10
            Oberflaeche:600
            Volumen:1000
            sven@Svens-MBP Desktop % 
            

            It seems that its working. I was able launch/debug the program.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              Looks like it's a Qt Creator issue.

              Do you have the same if you debug a default Qt application ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • S Offline
                S Offline
                slepp
                wrote on last edited by slepp
                #9

                Yes, same problem :-(

                Screenshot

                SGaistS 1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mpergand
                  wrote on last edited by mpergand
                  #10

                  Hi,
                  On macOS syslog() must be use:

                  #include <syslog.h>
                  
                  int main(int argc, char *argv[])
                  {
                      syslog(LOG_ERR,"%s\n","hello");
                      return a.exec();
                  }
                  

                  See: Here

                  SGaistS 1 Reply Last reply
                  0
                  • S slepp

                    Yes, same problem :-(

                    Screenshot

                    SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @slepp said in MacOS Terminal doesnt show in-/output when debugging:

                    Yes, same problem :-(

                    Screenshot

                    That's not a Qt default application. What I meant a default Qt widget application.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • M mpergand

                      Hi,
                      On macOS syslog() must be use:

                      #include <syslog.h>
                      
                      int main(int argc, char *argv[])
                      {
                          syslog(LOG_ERR,"%s\n","hello");
                          return a.exec();
                      }
                      

                      See: Here

                      SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @mpergand this is unrelated to the problem at hand. It's the debugging that fails from Qt Creator.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • S Offline
                        S Offline
                        slepp
                        wrote on last edited by
                        #13

                        @SGaist said in MacOS Terminal doesnt show in-/output when debugging:

                        Qt widget application

                        Oh sorry, now I tried to create a QT widget application, according to this guideline: https://doc.qt.io/qtcreator/creator-writing-program.html

                        When I debug with the terminal, nothing happens in there as well.

                        Screenshot

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          Which version of Xcode did you install ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          1
                          • S Offline
                            S Offline
                            slepp
                            wrote on last edited by
                            #15

                            I've installed Version12.4 (12D4e)

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              Looks like it might a bug.

                              Can you test the current beta version of Qt Creator ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              1
                              • S Offline
                                S Offline
                                slepp
                                wrote on last edited by
                                #17

                                I just tried the same thing under version Qt Creator 4.15.0-rc1 (4.14.84), still the same problem as with Qt Creator 4.14.2 :-(

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #18

                                  Then you should check the bug report system to see if there's something related there.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved