Move Locals before Arguments in the scopes list (Auxtools)

This commit is contained in:
Tad Hardesty 2020-11-27 17:35:24 -08:00
parent 2737e5d352
commit c93661f3d1

View file

@ -1024,16 +1024,8 @@ handle_request! {
}
DebugClient::Auxtools(auxtools) => {
let (arguments, locals, globals) = auxtools.get_scopes( frameId as u32 )?;
let mut scopes = vec![];
if let Some(arguments) = arguments {
scopes.push(Scope {
name: "Arguments".to_owned(),
variablesReference: arguments.0 as i64,
.. Default::default()
});
}
let (arguments, locals, globals) = auxtools.get_scopes(frameId as u32)?;
let mut scopes = Vec::with_capacity(locals.is_some() as usize + arguments.is_some() as usize + globals.is_some() as usize);
if let Some(locals) = locals {
scopes.push(Scope {
@ -1043,6 +1035,14 @@ handle_request! {
});
}
if let Some(arguments) = arguments {
scopes.push(Scope {
name: "Arguments".to_owned(),
variablesReference: arguments.0 as i64,
.. Default::default()
});
}
if let Some(globals) = globals {
scopes.push(Scope {
name: "Globals".to_owned(),