Over The Air Debugging in Visual Micro

The Serial Debugger in Visual Micro also supports a variety of boards which can be debugged Over The Air using WiFi:-

 

 

 

Software Setup

Note IconNote:

You will need to know your boards' IP address to setup the debugging, so uploading a simple sketch which connects to your WiFi and displays the IP Address is often required before continuing. For ESP32/8266 boards these can be discovered automatically on the network.

To enable the OTA Debugging, you will need to first select the vMicro > Debugger > Debug: Serial option.

Then if you open the Project Properties (from vMicro > Project Properties, or highlight the Project in Solution Explorer and press F4), you can then set the below properties:

Local Port: input your boards' IP Address

Remote Transport: Select "Udp" from the dropdown list

Once these are set, you can add the break / trace points you want in your sketch, and then continue to Build & Upload your software.

 

Serial Window Output

We do not interfere with the normal Serial output from your board, so this is not sent automatically over WiFi to the Serial Monitor Window.

You can call a method from our Debugger code to send messages to the PC, by using the MicroDebug.sendUserMessage() function, as shown below:

MicroDebug.sendUserMessage("Hello World");

 

Uploading

The ESP32 and ESP8266 families also support OTA uploading to the board, meaning it can be updated and debugged without having to reconnect it to your PC.

Other boards may support OTA upload which are not listed, which may also depend on your version of the board package, and WiFi card firmware.

If your board does not support OTA uploads, you will need to connect it with a USB/Serial cable to your PC and upload your software as normal.

 

Debugging

Once the upload has completed, the Serial Monitor can be opened to begin the debugging session, where the normal Serial Debugger Expressions and Serial Monitor windows will open, along with the @Plot/Free Memory windows if these features are being used.

 

Useful Links

Debugging Tutorial for Arduino

Breakpoint Actions: Showing Text and Watching Expressions When a Breakpoint is Hit

Drawing Graphs Using @Plot Windows