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 wrong line number for error (Read 1741 times)
nojmi
Newbies
*
Offline


Posts: 3
Joined: Dec 7th, 2021
wrong line number for error
Dec 7th, 2021 at 10:39pm
Print Post  
Hi,

I have attached an example of my problem. The line number for the error in the Micro build field is not adjusted with the program code. Double clicking on the error takes me to the wrong line. This causes confusion in the analysis. Can you help me how to fix it?

I use:
- VS 2022: 17.0.2 
- VisualMicro: 2021.1108.2209
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong line number for error
Reply #1 - Dec 7th, 2021 at 11:20pm
Print Post  
Hi

Please provide the information shown in the yellow box near the top of this page.

Thank you
  
Back to top
IP Logged
 
nojmi
Newbies
*
Offline


Posts: 3
Joined: Dec 7th, 2021
Re: wrong line number for error
Reply #2 - Dec 7th, 2021 at 11:35pm
Print Post  
I attached the file
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: wrong line number for error
Reply #3 - Dec 8th, 2021 at 10:40am
Print Post  
Thanks, would it be possible to ZIP the entire solution and email it to us so we can replicate the issue more easily?
(we delete this copy of your code once the issue has been resolved)
  
Back to top
IP Logged
 
nojmi
Newbies
*
Offline


Posts: 3
Joined: Dec 7th, 2021
Re: wrong line number for error
Reply #4 - Dec 8th, 2021 at 4:48pm
Print Post  
I made investigation and found Smiley
The problem occurred when I used a double definition for funtion like the one in the attached screenshot. I suspect that for such a function the compiler is double-counting lines of code. That is why it showed a bad place in the code.




  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: wrong line number for error
Reply #5 - Dec 8th, 2021 at 5:35pm
Print Post  
That is useful thank you. Normally the prototypes are added automatically but you have discovered a bug if you add them yourself.

We will fix that, thank you!

ps: For Arduino, you do not need the #include "arduino.h"
« Last Edit: Dec 8th, 2021 at 5:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint