VS Arduino
Visual Micro >> Usb/Serial/WiFi Debugging >> Local class not hitting breakpoints
https://www.visualmicro.com/forums/YaBB.pl?num=1522563151

Message started by Bob Jones on Apr 1st, 2018 at 6:12am

Title: Local class not hitting breakpoints
Post by Bob Jones on Apr 1st, 2018 at 6:12am
CommandData uses the CommandDefinitions class to manage multiple devices... At least that's my intention. I have been battling for days with first the compiler and now the debugging engine.

In my current compile, the single error message is "undefined reference to CommandDefinitions nextCommand();

in CommandDefinitions.h:
      bool nextCommand();

in CommandDefinitions.cpp:
bool CommandDefinitions::nextCommand() {
     if(commandReceived) {
           Serial.print("R");
     }
...
}

What I am seeing is that many methods in CommandDefinitions that appear to be properly declared and defined, but they get the "undefined" message.

And when I comment out those methods that won't compile, the remaining ones don't echo output from debug breakpoints... or even stop at a breakpoint.

The compile output is in the attached Zip as "output.txt".

And what version of C++ are we using here? That may be relevant.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=CommandData.zip ( 705 KB | 0 Downloads )

Title: Re: Local class not hitting breakpoints
Post by Visual Micro on Apr 1st, 2018 at 1:06pm
Hi,

I can't really help with code problems. They are best asked on stackoverflow.

You are using whatever c++ tool chain you have installed for whatever hardware you are using.

Usually based on GCC. Again best place to ask is the forum for whatever hardware you are using. The code issues will be the same in the arduino ide.

As for the debugger. If you place a breakpoint in the IF statement then the break will only happen if the condition is true


VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.