How to detect devel user switch
The Devel switch feature passes the login straight to the user module in devel_switch_user(); it doesn't give other modules the chance to intervene, and doesn't provide any context that would let you know how the login has been instigated.

I guess as a simple low-tech solution you could patch that function and set a session var before it invokes the login, something like

...
if (!$old_uid) {
  // Switch from anonymous to authorized.
  drupal_session_regenerate();
}

$_SESSION['login_from_devel_switch'] = TRUE;

$edit = array();
user_module_invoke('login', $edit, $user);
...


Then you can check for the existence of that session var wherever you need to prevent the profile from writing.