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) How to step debug blink? (Read 2528 times)
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
How to step debug blink?
Sep 10th, 2020 at 3:14pm
Print Post  
Windows 10, Visual Studio 2017, Arduino DUE
Cannot get started.  Created a new project and added only code to blink the on board light.  It does not blink.
Changed to debug mode, set a breakpoint, it will not step through the code.
There are too many things to describe.  What might I tell you that might help diagnose the problem?
« Last Edit: Sep 18th, 2020 at 8:50pm by Tim@Visual Micro »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to setp debug blink?
Reply #1 - Sep 10th, 2020 at 4:08pm
Print Post  
Hi

The usb debugger only supports stepping from breakpoint to breakpoint.

You need to use the hardware debug options to step the code.

It is always useful to post the info requested in yellow above.

I don't think ! workds for the Due toolchain use 0 or 1 or HIGH/LOW.
« Last Edit: Sep 10th, 2020 at 4:13pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
Re: How to setp debug blink?
Reply #2 - Sep 10th, 2020 at 10:35pm
Print Post  
Re: … only supports break point to break point.
Ok, changed that toolbar field to be Debug:Hardware, and understand that I may not be able to step through the code.
Re: I don't think ! workds for the Due toolchain use 0 or 1 or HIGH/LOW.
Ok Changed light flash code to:
Code
Select All
if( current_time - light_time >= 500 )
{
      light_time = current_time;
//      light_on = !light_on;
      if (light_on == true)
         light_on = false;
      else
         light_on = true;

      digitalWrite(LED_BUILTIN, light_on);
   };
 


Set breakpoint at the if statement.  In the debut dialog, Actions is checked and Continue execution is not checked. Build, then F5, Start debugging.
Output windows shows that VS does the upload and ends with CPU reset.  
Then, …, nothing.
Press F10 to Step
Output window clears, proclaims it is compiling, and proceeds to upload the code.
That is not expected.
Press F11 to step, exactly the same results.
Turn off debugging and try to run.  Light does not blink.  F10 causes a project rebuild and download. 
I suspect that there is a setup problem.  I am certain that these symptoms are not make good sense to me.
« Last Edit: Sep 10th, 2020 at 10:36pm by bk13 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to setp debug blink?
Reply #3 - Sep 11th, 2020 at 12:33pm
Print Post  
If you have changed your config to hardware debug then you need to post the info requested in yellow above again.

I can assure you that hardware debug allows step with the correct config and that the led on the board blinks with the correct code Smiley
« Last Edit: Sep 11th, 2020 at 12:33pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
Re: How to setp debug blink?
Reply #4 - Sep 11th, 2020 at 7:52pm
Print Post  
I do not see anything highlighted in yellow above.  Arduino Genuino was started and a minimum blink program was implemented. It builds, downloads, and runs.  The light does blink.   
Start a new minimal project in VS. Copy all the code to the new VS project. It compiles and downloads, but the light does not blink.  There is something wrong in my setup.

There is an error message in Variable Explorer that might be significant.  I don't know how to coerce VS to provide additional details.
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to setp debug blink?
Reply #5 - Sep 11th, 2020 at 8:12pm
Print Post  
The variable explorer is part of hardware debugging so you can close the window and ignore it. 

It looks like you have all debugging switched off which is good, we wouldn't confuse things with debugging for such a basic issue such as failing to blink.

Can you please email your sketch from arduino ide and the one from visual studio.

I have also attached an image of the yellow box from above in case it is different color for you.

Thanks



  

Please Register or Login to the Forum to see File Attachments
Back to top
WWW  
IP Logged
 
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
Re: How to setp debug blink?
Reply #6 - Sep 17th, 2020 at 8:51pm
Print Post  
I sent the email suggested along with the attachments.  There has been no reply.

I ask for any reader to please send me working solution of a minimal project for an Arduino to see if that will work on my computer.  In the list of allowed file types sln is not present.  Maybe zip it up and post.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to step debug blink?
Reply #7 - Sep 17th, 2020 at 9:37pm
Print Post  
Hi

We can't see any email from you. 

A working project is obtained using "File>New>Arduino Project" or "File>New>Project>C++\Arduino Empty Project".

The code should be exactly same as Arduino IDE therefore there is some confusion and we need to see the requested config.

Thanks
« Last Edit: Sep 18th, 2020 at 8:52pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
Re: How to step debug blink?
Reply #8 - Sep 19th, 2020 at 6:45pm
Print Post  
I clicked on the link: Click here to Email us, and sent an email to 'sales@visualmicro.com'  That is what came up for me.  Now when I click it wants to create a new account.   
Rather putting a link to click and do something, maybe just the email.
Where should I send the email?
you can send to me at  b1 the two letters, that special symbol, followed by m  then b then kelly then dot net.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to step debug blink?
Reply #9 - Sep 19th, 2020 at 7:05pm
Print Post  
I have your email now thanks. There are two properties you need to enable as shown left side of the yellow box. You missed the "Verbose" ons so we can see the build commands.

Enabled vMicro > Compiler > Show Build Properties and Verbose

Please resend the visual micro build output after clicking compile. 

The code isn't required thanks.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to step debug blink?
Reply #10 - Sep 21st, 2020 at 9:12pm
Print Post  
We have looked at this again. We think you are on an older version of Visual Micro which had an issue with ICE upload to the board you are using. Please update Visual Micro to the latest release and I am sure it will all work as expected.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint