HISE Logo Forum
    • Categories
    • Register
    • Login

    Getting debug output to the compiler console..

    Scheduled Pinned Locked Moved C++ Development
    17 Posts 4 Posters 1.1k Views
    Loading More Posts
    • 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.
    • d.healeyD
      d.healey @Lindon
      last edited by

      @Lindon Try putting the DBG somewhere else - like at the start of main, so you can rule out (a)

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @d.healey
        last edited by

        @d-healey -- and "Main" is where in HISE?

        HISE Development for hire.
        www.channelrobot.com

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          My guess is mainController.cpp is doing the same thing that main usually does.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @d.healey
            last edited by Lindon

            @d-healey - yep that was my guess too so I put this in there:

            
            /** The entire HISE codebase
            
            
            */
            namespace hise { using namespace juce;
            
            #if HI_RUN_UNIT_TESTS
            bool MainController::unitTestMode = false;
            #endif
            
            DBG("in here at the start");
            
            MainController::MainController() :
            
            	sampleManager(new SampleManager(this)),
            	javascriptThreadPool(new JavascriptThreadPool(this)),
            	expansionHandler(this),
            	allNotesOffFlag(false),
            	maxBufferSize(-1),
            	cpuBufferSize(0),
            ...
            ...
            ...
            

            Compiled a release version and ran it -----

            nothing showed up in the output window, so - its looking like a. (I dont know what I'm doing, not surprising...)

            Where does DBG send statements to?

            more research shows this:

            DBG( "message" );
            messages only show up in the output window in your IDE in debug builds, not release builds.
            If you want to know how it works, right click on it, “Go to definition” and look at the source code. it’s just a macro.

            use breakpoints. Xcode and Visual Studio have great support for breakpoints and debugging.

            HISE Development for hire.
            www.channelrobot.com

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Lindon
              last edited by

              @Lindon

              Where does DBG send statements to?

              I work in the terminal so that's where I see the output. Someone else was asking me about debugging in VS a while ago, I suggested they search YouTube and find some proper instructions for debugging - I'll be doing this too when I do my next Windows build - they seemed to find it helpful.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @d.healey
                last edited by

                @d-healey well I built another debug image - and still nothing is showing up... so youTube might be my next port of call...

                • is this any easier in MacOS?

                HISE Development for hire.
                www.channelrobot.com

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Lindon
                  last edited by

                  @Lindon I'm a GNU/Linux guy :) You can debug on Windows and MacOS using the terminal though. Make a debug build and run it from the terminal.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart
                    last edited by

                    The DBG call must be inside a function body and is only available in Debug builds (hence the name). In your example you‘ve put it into global namespace which is basically a vacuum in C++.

                    LindonL B 2 Replies Last reply Reply Quote 1
                    • LindonL
                      Lindon @Christoph Hart
                      last edited by

                      @Christoph-Hart - yep I worked that out so I put it in the function...still I'm not seeing any output....:-(

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 0
                      • B
                        Bob Stuck @Christoph Hart
                        last edited by

                        @Christoph-Hart Sent you a message.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        25

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.8k

                        Posts