Visual Micro
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Installation & Troubleshooting >> Arduino Due com port
https://www.visualmicro.com/forums/YaBB.pl?num=1599439423

Message started by bk13 on Sep 7th, 2020 at 1:43am

Title: Arduino Due com port
Post by bk13 on Sep 7th, 2020 at 1:43am
Windows 10, probably latest update. Visual Studio Professional 2017, Version 15.9.12
I am not certain this is the proper place.  Do I need to change forums?
I am shifting from Arduino Genuino to VS and need assistance finding some things. 
What are the steps to monitor the com port?

Select Debug -> <project_name> Properties 
Field Target Platform contains:  Windows 10.   That does not seem right.  The target is an Arduino DUE.

Select Build -> Run Code Analysis on Solution.  After a few seconds VS posts the message, in part:
Rebuild All: 1 succeeded, o failed, o skipped.
Cool.  Where is the analysis? The result that is.

Title: Re: Arduino Due com port
Post by Visual Micro on Sep 7th, 2020 at 1:54am
Hi

There are a few ways to open the serial monitor. The easiest is to use the vMicro tool bar button or menu. On that you will see the port neat the bottom with "View Port Monitor" just below it. The same should be on a tool bar when you have an Arduino project open.

The documentation is here, I suggest following the guides near the top, creating projects,  opening projects, first steps etc.
https://www.visualmicro.com/page/User-Guide.aspx?doc=index

If you use the Visual Studio Build or Debug menus then stick to Build>Solution or Project and to Build + Upload use Debug>Start without debugging or Debug>Start with debugging. The build/start commands do the same as the ones shown on the vMicro menu.

If you have continued problems then please postr a screen shot of the entire IDE with an Arduino project open.


Title: Re: Arduino Due com port
Post by bk13 on Sep 7th, 2020 at 1:56am
Wow!  Did not expect a reply so fast.  Found the monitor.  My brain just would not recognize it.  Working your link.
Thank you.

Edit:
I have been there before.  Because of differences between my system and those pages I presume it is primarily directed to the Atmel Studio.  I think I am not using that, pure Visual Studio instead.  But, am not certain of that.  Already had several versions of Visual Studio and am pretty sure I went that way.
I copied in code from a running Genuino project. It builds and downloads.  F10 and F12 do not do anything.  I am not confident all the setups are correct so go for the dumb mistakes first.  I selected a screen shot so lets see if that was done properly.

Visual_studtio_getting_started.JPG (219 KB | 0 )

Title: Re: Arduino Due com port
Post by Visual Micro on Sep 7th, 2020 at 1:59am
Great, if you need to monitor an additional port(s) unrelated to the upload port then use vMicro>General>Monitor Alternative.

Title: Re: Arduino Due com port
Post by bk13 on Sep 7th, 2020 at 2:26am
Follow up.  I probably should have started a new post rather than editing the previous.

Edit:  The Output windows is stingy with new lines and must be scrolled left and right.  Any way to configure that.
It tells me the serial debugger was delayed waiting for an incoming line of data.  ….
The last few lines in the Output window are:

Quote:
Program Running 'ac_condensor_monitor'
User Experience: The serial debugger was delayed waiting for an incoming line of data. If the Serial.print() command is used between breakpoints, then ensure that a line termnator is sent using .println() or .print("\r\n"). Optionally, use #if defined(VM_DEBUG) to add code that is only active when debugging. (if this is expected then switch this user experience message off in tools>options>visual micro>micro debug)
Debugging has exited

I never got to start debugging.  The code does use println() rather than print().
I do use println() rather than print()
End result: I cannot do any debugging. 

Title: Environment list error
Post by bk13 on Sep 7th, 2020 at 3:50am
Still trying to get my first debugging session going.  F10 and F11 do not do anything.  Panel Variable Explorer declares: Error retrieving environment list.  That panel is posted.
Clicking on that line to open it does not provide any additional information.
What do I need to do different?

error_environment_list.JPG (19 KB | 0 )

Title: Re: Arduino Due com port
Post by Simon@Visual Micro on Sep 7th, 2020 at 10:02am
The Output Window Text Wrapping can be switched on / off using the word wrap button on the far right of the Output Window Toolbar
https://docs.microsoft.com/en-us/visualstudio/ide/reference/output-window?view=vs-2019

The Serial Debugger you are using has custom windows for variable tracking, and we always recommend working through the walk through guide to get started with this feature:
Debugging Tutorial for Arduino

F10 and F11 are for Step Into / Over which are not available in the Serial Debugger at present, with more detail on the different debuggers outlined below.
Differences between Visual Micro Debugging, Gdb Debugging and Visual Studio's Debugging of Native Platforms

As you can have a larger number of breakpoints with the Serial Debugger, you can add a break into each function for example, and if you wanted to only stop on these in a specific scenario, then using the conditional breakpoints features is also useful.
Conditional Breakpoints
Video: Conditional Debugging for Arduino Projects

Visual Micro » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2021. All Rights Reserved.