mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
fix(debugger): Apply Sort values alphabetically to the frame's locals (#170)
The Variables view loads the first scope's locals of the selected frame up front; those ignored the Data Views sort setting, which only applied to children expanded later.
This commit is contained in:
@@ -40,6 +40,8 @@ import {
|
||||
} from "../state";
|
||||
import { VariablesView, type VarRoot } from "./VariablesView";
|
||||
import { pushHistory, readHistory, setConsoleHistoryBrowser } from "./expressionHistory";
|
||||
import { sortVariables } from "../values";
|
||||
import { workflowSettings } from "@/platform/workflowSettings";
|
||||
import styles from "./DebugToolWindow.module.css";
|
||||
import { tx } from "@/platform/i18n";
|
||||
|
||||
@@ -389,7 +391,10 @@ function VariablesPane({ session }: { session: DebugSession }) {
|
||||
try {
|
||||
scopes = await call(commands.debugScopes(session.id, frame));
|
||||
const first = scopes.find((s) => !s.expensive);
|
||||
if (first) locals = await call(commands.debugVariables(session.id, first.variablesReference));
|
||||
if (first) {
|
||||
const vars = await call(commands.debugVariables(session.id, first.variablesReference));
|
||||
locals = workflowSettings().debugger.sortValues ? sortVariables(vars) : vars;
|
||||
}
|
||||
} catch {
|
||||
// Frame went away (resumed).
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user