Hi,
For my personal use, I started making an alternative to the Arduino IDE Serial Monitor with html capabilities. I just finished a first version (programmed in Processing 3.1) called 'HTML Serial Monitor' and would like to know what you think and if needs improvement to be useable by other people.
How it works: In your sketch you can insert html codes (e.g. Serial.println("Warning") ;) or adjust the properties of html elements with javascript or special codes (e.g. Serial.println("[myDiv.b:#FF00FF]") ; to change the background color of the div with id 'myDiv'). 'HTML Serial Monitor' receives these messages and runs a webserver. Your favorite browser connect to this webserver (port 8080) and shows your html enhanced debugging messages as a webpage.
Because html enhanced text is larger, the memory overhead for the Arduino can be greater. I have taken some measures to minimize this like implementing abbreviated notations and the possibility to use local html snippets and html template files (both customizable).
A very basic sketch looks like:
void setup(){
Serial.begin(9600);
}
String red="Value is: <b style='color:red;'>";
String grn="Value is: <b style='color:green;'>";
String eol="</b>";
void loop(){
int val = analogRead(analogPin);
if (val<512) Serial.println(red+valueD3+eol);
if (val>=512) Serial.println(grn+valueD3+eol);
delay (300);
}

It also possible to insert html snippets stored in a local file. Some snippets I made, are shown in the following screenshot:

To minimize the Strings inside your sketch it's also possible to make the monitor load a local file. In this example the current value of each Arduino pin is shown graphically and for a selected pin the history is plotted:
#include <HTMLSerialMonitor.h>
HTMLSerialMonitor SerialM;
void setup(){
SerialM.begin(9600);
//We setup the gui and start by clearing the page with [cls]
SerialM.println("[cls]");
//We setup the gui and start by clearing the page with [cls]
SerialM.println("[sketchpath:"+String(__FILE__)+"]");
//Setup the pins
for (int i=2;i<14;i++) pinMode(i,INPUT);
}
String logPin="A0";
void loop(){
//Digital pins
for (int i=2;i<14;i++) {
int dR=digitalRead(i);
String id="pD"+String(i);
String col="red";
if (dR==1) col="green";
SerialM.print (id,String(dR));
SerialM.print (id,"b",col);
id=String(i);
//if this pin is to be displayed in graph we need to send value to graph control
if (id.equals(logPin)){
SerialM.print("osc",String(255+512*dR)); //rescale pin value for nice step
}
}
//[Analog pins
for (int i=0;i<8;i++) {
String id="pA"+String(i);
int aR=analogRead(i);
String val="rgb(200,200,";
val+=String(255-aR/4);
val+=")";
SerialM.print (id,String(round(aR/103)));
SerialM.print (id,"b",val);
id="A"+String(i);
//if this pin is to be displayed in graph we need to send value to graph control
if (id.equals(logPin)){
SerialM.print("osc",String(aR));
}
}
//]
SerialM.println();
delay(300);
}
//We need serialEvent to let users change the pin displayed in the graph
//If you use SerialEvent to intercept messages you need to
//use the available and read method from the HTMLSerialMonitor library
String inputString="";
void serialEvent() {
while (SerialM.available()) {
char inChar=(char) SerialM.read();
inputString += inChar;
if (inChar == '\n') {
logPin=inputString.substring(0,inputString.length()-1);
inputString="";
}
}
}

More explanation and all source is available on GitHub - HTMLSerialMonitor.