HISE Logo Forum
    • Categories
    • Register
    • Login

    Getting debug output to the compiler console..

    Scheduled Pinned Locked Moved C++ Development
    18 Posts 5 Posters 1.2k 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.
    • 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
                      • O
                        Orvillain
                        last edited by

                        Hey apologies for the bump. But I got this to work by putting:
                        JUCE_LOG_ASSERTIONS=1

                        into the preprocessor definitions and then rebuilding. I get data from my custom c++ node printing to the visual studio log:
                        947b7f47-31e0-48be-ad66-7de6be45afe0-image.png

                        It wasn't working until I did that.

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

                        15

                        Online

                        1.7k

                        Users

                        11.9k

                        Topics

                        103.2k

                        Posts