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
Show Message before Build (Read 73 times)
xmen
Junior Member
**
Offline



Posts: 50
Show Message before Build
Nov 2nd, 2019 at 10:39am
 
I have multiple variable settings in code and before every upload I would like VS to show a message containing configuration name("Debug" or "Release") and show an integer value from code's global variable.

like variable in code is like

int Number = 900023;

so the VS should show 900023 value in message dialog

Is there any way to do that or could this be added in future ?


using VS 2017
Back to top
« Last Edit: Nov 2nd, 2019 at 10:41am by xmen »  
 
IP Logged
 
Visual Micro
Administrator
*****
Online



Posts: 10565
United Kingdom
Re: Show Message before Build
Reply #1 - Nov 3rd, 2019 at 1:16pm
 
Sounds like you need to write a small .exe and add it as a custom arduino event/action. Your .exe can scan code files and show a dialog.

Alternaively add a breakpoint to the setup() that shows the {variable} and make the breakpoint stop/wait for F5. In this case you would need to upload.

Maybe you could also print a warning from inside your code using the #error type of messages
Back to top
« Last Edit: Nov 3rd, 2019 at 1:19pm by Visual Micro »  
WWW  
IP Logged
 
xmen
Junior Member
**
Offline



Posts: 50
Re: Show Message before Build
Reply #2 - Nov 4th, 2019 at 7:07am
 
thats a good idea but when I set Pre-Built Event to
Code:
ECHO "make changes" 


nothing happens

inside Project Properties > Configuration Properties > Build Events > Pre-Built Event


There is no "custom arduino event/action"
Back to top
« Last Edit: Nov 4th, 2019 at 7:22am by xmen »  
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print