Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/debugger/godot4/debug_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class GodotDebugSession extends LoggingDebugSession {
private configuration_done: Subject = new Subject();
private mode: "launch" | "attach" | "" = "";

public variables_manager = new VariablesManager(this.controller);
public variables_manager: VariablesManager;

public constructor(projectVersion: string) {
super();
Expand Down
4 changes: 4 additions & 0 deletions src/debugger/godot4/server_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { get_sub_values, parse_next_scene_node, split_buffers } from "./helpers"
import { VariantDecoder } from "./variables/variant_decoder";
import { VariantEncoder } from "./variables/variant_encoder";
import { RawObject } from "./variables/variants";
import { VariablesManager } from "./variables/variables_manager";

const log = createLogger("debugger.controller", { output: "Godot Debugger" });
const socketLog = createLogger("debugger.socket");
Expand Down Expand Up @@ -407,9 +408,12 @@ export class ServerController {
}
this.request_stack_dump();
this.request_scene_tree();
// variables_manager should be recreated for each "debug_enter"
this.session.variables_manager = new VariablesManager(this);
break;
}
case "debug_exit":
this.session.variables_manager = undefined;
break;
case "message:click_ctrl":
// TODO: what is this?
Expand Down