Since the debug console already supports color, users being able to access the color as a property would aid in debugging by making it easier to see which particular line is currently important.
This can be accomplished with a .TextColor property in the Debug object.
Sub PrintCritical(sMsg As String)
Debug.TextColor = &HFF0000
Debug.Print sMsg
Debug.TextColor = vbDebugColorDefault ' (have a constant for the default color)
End Sub
Another useful feature would be a .PrintEx method that would take the color as an argument, as well as a Level argument.
Debug.PrintEx(message As String[, Level As tbLogLevels, Color As Long])
Then in project settings a corresponding setting of the minimum level to show. A helpful default enum,
Enum tbLogLevels
LogInformation = 0
LogMedium = 1000
LogCritical = 2000
End Enum
the gaps would allow room for custom user levels.
Since the debug console already supports color, users being able to access the color as a property would aid in debugging by making it easier to see which particular line is currently important.
This can be accomplished with a
.TextColorproperty in the Debug object.Another useful feature would be a
.PrintExmethod that would take the color as an argument, as well as aLevelargument.Debug.PrintEx(message As String[, Level As tbLogLevels, Color As Long])Then in project settings a corresponding setting of the minimum level to show. A helpful default enum,
the gaps would allow room for custom user levels.