Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Upload Stops Working after a while (Read 321 times)
FrankP
Member
***
Offline



Posts: 111
Upload Stops Working after a while
Oct 12th, 2019 at 6:21pm
 
Lately I have been running into a problem where I can't use F5 (or Debug/Start Debugging) to compile and upload a sketch to the Arduino controller.  If I close and then re-open Visual Studio, then I can use F5 again for a while.  I have no idea what causes this to happen.  Anyone else experiencing this?

VS2017 CE V15.9.16, VM 1.1908.5

TIA,

Frank
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Upload Stops Working after a while
Reply #1 - Oct 12th, 2019 at 6:50pm
 
It is also worth posting your output as per the yellow box above because that answers a lot of questions, such as is debug enabled.

F5 launches debug, if it is enbabled and running then F5 will not build. You can press shift+F5 to kill the debugger then F5 to launch debug again.


One other probably unrelated point ...

If you have more than one project in the solution, or have linked files that don't belong to the project in the solution, ensure they are not active in the code editor window when clicking F5 or alter the defaut property for "active code editor takes priority" to false.
Back to top
 
WWW  
IP Logged
 
FrankP
Member
***
Offline



Posts: 111
Re: Upload Stops Working after a while
Reply #2 - Oct 12th, 2019 at 7:21pm
 
Tim,

Thanks for the input.  Here's the output from a small program that wouldn't compile/upload with either F5 or Debug/Start Debugging.  Just saving the solution does not help.  Saving, closing & re-opening the solution does not help. However, if I save the solution and then close/re-open VS2017, then I can get F5 back (for a while).

I have attached two files.  One is the verbose build output with F7 (F5 inoperable), and the other is after the VS close/re-open showing the output of F5.

Hope this helps,

Frank
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Upload Stops Working after a while
Reply #3 - Oct 12th, 2019 at 8:03pm
 
I'm not sure how the xml files (from the _vm subfolder) in your zip relate to the request in the yellow box above.
Back to top
« Last Edit: Oct 12th, 2019 at 8:03pm by Visual Micro »  
WWW  
IP Logged
 
FrankP
Member
***
Offline



Posts: 111
Re: Upload Stops Working after a while
Reply #4 - Oct 13th, 2019 at 1:00am
 
Tim,

oops!  Let me try that one again - I inadvertently saved the output files as xml vs txt. Try these

Frank
Back to top
 

Downloads.zip (14 KB | 3 )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Upload Stops Working after a while
Reply #5 - Oct 13th, 2019 at 4:26pm
 
Thanks, I don't know what would cause that. For F5 we simply respond to the command that Vs sends to our code. The commands are textual such as ProjectBuild, debugStart etc. So it's a simple area but we will do some testing to try to reproduce.

When it fails next please submit screen shot of entire IDE.

Thanks
Back to top
« Last Edit: Oct 13th, 2019 at 4:27pm by Visual Micro »  
WWW  
IP Logged
 
FrankP
Member
***
Offline



Posts: 111
Re: Upload Stops Working after a while
Reply #6 - Oct 21st, 2019 at 9:56pm
 
Tim,

Failed again. It has been working properly for quite some time, to the point where I thought it was just my imagination.  However, "it's baaaaaack!" Wink

I have included a screenshot of the entire IDE as requested.  In addition, I confirmed that the 'Connect' label on the serial monitor port was NOT green (I have seen in the past that this condition would disable F5).

Hope this helps,

Frank
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Upload Stops Working after a while
Reply #7 - Oct 22nd, 2019 at 6:04pm
 
The next time it happens see if it starts working if you first click between two different code files.

ps: green serial connect when debug is enabled would certainly prevent F5 from working. You also don't say if shift+f5 or start without debugging also has same problem.
Back to top
 
WWW  
IP Logged
 
FrankP
Member
***
Offline



Posts: 111
Re: Upload Stops Working after a while
Reply #8 - Oct 22nd, 2019 at 8:27pm
 
I've actually had projects where the green connect status didn't keep F5 from working, but I could never figure out the magic.

When F5 doesn't work, typically nothing works, including SHIFT-F5 followed by F5.

Frank
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Upload Stops Working after a while
Reply #9 - Oct 23rd, 2019 at 3:38pm
 
When the problem happens does the Visual Micro Build and Upload work?

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



Posts: 111
Re: Upload Stops Working after a while
Reply #10 - Oct 23rd, 2019 at 3:58pm
 
Didn't even know that option existed.  I'll try it the next time the problem appears

Frank
Back to top
 
 
IP Logged
 
FrankP
Member
***
Offline



Posts: 111
Re: Upload Stops Working after a while
Reply #11 - Oct 24th, 2019 at 3:01pm
 
The vMicro 'Build & Upload' menu item ALWAYS works, even when the 'Connect' label on the serial monitor is green denoting an active connection to the Arduino. That's very nice, and I've now started using it in preference to first manually disconnecting and then pressing F5.

So far, I have been unable to again replicate the situation where the 'Connect' label is black, but F5 won't work - so that could have been my imagination.

Sometimes F5 works, even when the 'Connect' label is green, but I haven't figured out WHY this works.

As a suggestion, can the vMicro's 'Build & Upload' function be given a distinct hot key, say CTR+SHIFT+F5?  I know I can use ALT+'o' to get the vMicro menu up, but then I still have to click on 'Build & Upload'.  Just a thought Wink

Frank
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Upload Stops Working after a while
Reply #12 - Oct 24th, 2019 at 6:35pm
 
F5 is the "debug continue" command therefore when in a debug session (green serial in debug mode) F5 does not kill the debug session, at the same time it also should not build.

The "vMicro>Build & Upload" and "Upload Last" will always try to upload.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print