Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) MicroDebug not declared (Read 10041 times)
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
MicroDebug not declared
Jan 22nd, 2016 at 12:27am
Print Post  
any idea why I get this bug?



Compiling debug version of 'MyAppSpeedo' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'
Build folder: 2560
MyAppSpeedo.ino:In function 'void setup()
MyAppSpeedo.ino:150:17: error: 'MicroDebug' was not declared in this scope
:void setup () { 
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
MyAppSpeedo.ino:In function 'void dummy()
MyAppSpeedo.ino:222:16: error: 'MicroDebug' was not declared in this scope
:void dummy () {
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
MyAppSpeedo.ino:In function 'void loop()
MyAppSpeedo.ino:230:20: error: 'MicroDebug' was not declared in this scope
:void loop () {if ((
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
MyAppSpeedo.ino:230:44: error: '_VM_AUTO_REPORT_LAST_MS_' was not declared in this scope
:void loop () {if ((
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
Error compiling project sources
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: MicroDebug not declared
Reply #1 - Jan 22nd, 2016 at 1:09pm
Print Post  
Which version of visual micro are you using. The version is shown in tools>extensions and updates

This might be the same as your other report which has been answered. Did you read my previous answer(s) to your other posts?
  
Back to top
WWW  
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #2 - Jan 22nd, 2016 at 2:12pm
Print Post  
I am using the lastest version that you have on your website.  I dont see an answer to my question anywhere on the forum , please answer here
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: MicroDebug not declared
Reply #3 - Jan 22nd, 2016 at 5:05pm
Print Post  
Please confirm your visual micro version from "tools>extensions and updates"

Also confirm if release build works okay?

Finally email the project_name.cpp which is created in the build folder. To see the build folder path switch on tools>options>visual micro>compiler>show build folder
  
Back to top
WWW  
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #4 - Jan 22nd, 2016 at 5:22pm
Print Post  
1601.21.0

release builds fine
under debug, there is no created cpp file in the build folder
  
Back to top
 
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #5 - Jan 27th, 2016 at 2:02am
Print Post  
still not fixed. when can you release the fix
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: MicroDebug not declared
Reply #6 - Jan 28th, 2016 at 1:09pm
Print Post  
In your first post you have shown the link to your temp build folder.

If you zip and email that folder we will be able to see what options you have enabled for debug and where breakpoints have been places.

Considering the debug works for most users the issue is going to be related in some way to settings or placement so this will help resolve and saves having to ask for more info.
  
Back to top
WWW  
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #7 - Jan 28th, 2016 at 2:58pm
Print Post  
I cant upload it. it is 800k large and the upload only allows 250k.  what can I email you specifically in that folder?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: MicroDebug not declared
Reply #8 - Jan 28th, 2016 at 3:00pm
Print Post  
Hi there, 

You can email thanks, you have the email address
  
Back to top
WWW  
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #9 - Jan 28th, 2016 at 3:02pm
Print Post  
i am emailing to you
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: MicroDebug not declared
Reply #10 - Jan 28th, 2016 at 3:20pm
Print Post  
Thanks for sending. We need to look at the syntax you have used at the top of the sketch.

Historically it's been quite important that the arduino.h and other standard headers/prototypes are automatically added by the compiler into the temp copy. The insert point is supposed to be before the first line of valid code but you have a lot of conditional includes which are causing a problem.

There is a change due for visual micro that improves this situation using a new design released in arduino 1.6.6/1.6.7 however your code could probably be cleaned up slightly to avoid the need for the change.

See below what the compiler is producing and where the arduino.h, vmdbg and other code is inserted. It's surrounded by BOOL_USE_SOFTWARE_SERIAL == true

It might help to see your original .ino code I can recommended some minor changes. The error you are seeing is because the debugger is active and you have also enabled live digital/analog or memory reports. All of that code will only be active if your BOOL_USE_SOFTWARE_SERIAL is true

Code
Select All

#include <Arduino.h>

#include "globalDefines.h"

#if BOOL_USE_OLED == true
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <gfxfont.h>

#include <Fonts/FreeSans24pt7b.h>

#include "oLedUtilitiesFExtern.h"

#endif

#include "ioPorts.h"
#include <OBD.h>

#if BOOL_USE_OBD2 == true
#include "obdUtilitiesFExtern.h"
#endif

#if BOOL_USE_SOFTWARE_SERIAL == true
#include <SoftwareSerial.h>
#endif

#include "output.h"
#include "outputFExtern.h"
#include "Utilities.h"
#include "UtilitiesFExtern.h"
#include "commandWindowFExtern.h"

#if BOOL_USE_SOFTWARE_SERIAL == true
#include "arduino.h"
#include <Wire.h>
#include <VM_DBG.h>

//
void dummy ();
//
unsigned long _VM_AUTO_REPORT_LAST_MS_	=	0L;

SoftwareSerial mySoftwareSerial ( PORT_SOFTWARE_SERIAL_RX_INTO_ARD, PORT_SOFTWARE_SERIAL_TX_OUT_OF_ARD );



#endif
 



I think that adding some variable or declaration above and outside of any of your #if statements will cause the insert point for the arduino headers to be in a better location.

For example:-

Code
Select All
#include <Arduino.h>

#include "globalDefines.h"

>>>this is where the arduino headers (plus debug) will be inserted

bool firstVariable;

 

  
Back to top
WWW  
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #11 - Jan 28th, 2016 at 3:23pm
Print Post  
ok thanks. I will look into it!
  
Back to top
 
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #12 - Jan 28th, 2016 at 10:45pm
Print Post  
i emailed you my ico just now thank you.
  
Back to top
 
IP Logged
 
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Re: MicroDebug not declared
Reply #13 - Jan 28th, 2016 at 11:00pm
Print Post  
i added your variable to below the globals.h and it fixed the problem.

so I am OK for now,
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: MicroDebug not declared
Reply #14 - Jan 28th, 2016 at 11:09pm
Print Post  
Ok thanks for the update
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint