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
Normal Topic Debug compile fails if loop is just void loop() {} on one line (Read 3833 times)
Bas
Junior Member
**
Offline


Posts: 50
Joined: Feb 20th, 2017
Debug compile fails if loop is just void loop() {} on one line
Apr 3rd, 2017 at 7:25pm
Print Post  
admin: solved and added the solution as the subject. thanks!
original subject: Breakpoints become invisible when pasting over existing code


When I have a breakpoint in my code, and I replace the code by selecting it an pasting an other pice of code over it, the breakpoint graphic disappears, but the compiler still thinks the breakpoint is there.

This results in error messages like 

Quote:
Debug build failed for project 'ProgMemTest'
ProgMemTest.ino: 3:15: error: redefinition of 'long unsigned int _VM_AUTO_REPORT_LAST_MS_
   unsigned long _VM_AUTO_REPORT_LAST_MS_ = 0L
ProgMemTest.ino:2: note  long unsigned int _VM_AUTO_REPORT_LAST_MS_ previously defined here
   unsigned long _VM_AUTO_REPORT_LAST_MS_ = 0L
 
ProgMemTest.ino: 39:15: error: expected unqualified-id before 'if
   void loop() {}if ((millis()-_VM_AUTO_REPORT_LAST_MS_)>=150) {_VM_AUTO_REPORT_LAST_MS_=
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging.
                 If this is an unsupported debug board then switch the tool bar from 'Debug' to 'Release' and try the build again
.

« Last Edit: Apr 3rd, 2017 at 9:07pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints bevome invisible when pasting over exsiting code
Reply #1 - Apr 3rd, 2017 at 7:46pm
Print Post  
Visual Micro has to ask VS for a list of breakpoints each time it compiles so it's a strange one.

Which version of Visual Studio? Help>About and does it shown an "Update" number?

Thanks
  
Back to top
WWW  
IP Logged
 
Bas
Junior Member
**
Offline


Posts: 50
Joined: Feb 20th, 2017
Re: Breakpoints bevome invisible when pasting over exsiting code
Reply #2 - Apr 3rd, 2017 at 8:28pm
Print Post  
Tim@Visual Micro wrote on Apr 3rd, 2017 at 7:46pm:
Visual Micro has to ask VS for a list of breakpoints each time it compiles so it's a strange one.

Which version of Visual Studio? Help>About and does it shown an "Update" number?

Thanks


Version 14.0.25431.01 Update 3
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints bevome invisible when pasting over exsiting code
Reply #3 - Apr 3rd, 2017 at 8:32pm
Print Post  
Looking again this isn't a breakpoint it is visual micro failing to add automatic reporting to the loop.

You must have switched on analogpin, digitalpin or memory viewer etc.

Please look at the format of the void loop() to see where the first brace is located? It's causing a problem that should be handled better by visual micro.

Visual Micro attempts to add code just inside the first brace ...

Code
Select All
void loop()
{ debugger auto reporting code here


} 



or

Code
Select All
void loop() { debugger auto reporting code here 




We try to establish where the first brace is and must be failing.

Obviously this happens in the temp build code in the build folder. So if you switch on "show build folder" you can inspect the project_name.cpp to see the problem.

« Last Edit: Apr 3rd, 2017 at 8:33pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bas
Junior Member
**
Offline


Posts: 50
Joined: Feb 20th, 2017
Re: Breakpoints bevome invisible when pasting over exsiting code
Reply #4 - Apr 3rd, 2017 at 8:44pm
Print Post  
I think I found the culprit ...
As this is just a test project, there is no body to the loop() method and to save myself typing an extra CR .. i typed the following:

Code (C++)
Select All
void loop() {} 



Changing it to the following solved the problem:

Code (C++)
Select All
void loop() {
} 


« Last Edit: Apr 3rd, 2017 at 8:45pm by Bas »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Breakpoints bevome invisible when pasting over exsiting code
Reply #5 - Apr 3rd, 2017 at 9:05pm
Print Post  
Ah yes I keep meaning to fix that. I think it's a common test  Smiley

Thanks for the reminder
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint