register method
Register a single profile at runtime.
Implementation
void register(DebugProfile profile) {
_profiles.add(profile);
// if this is the first profile added, ensure index stays valid
if (_profiles.length == 1) {
_currentProfileIndex = 0;
}
}