Skip to content

Expression evaluator does not run inside static functions #107785

@ineptNonsense

Description

@ineptNonsense

Tested versions

Reproducible in 4.5.beta1
Not very relevant in earlier versions (this Issue continues #103979, which was merged into 4.5.beta1).

System information

Windows 11 - Godot v4.5.beta1

Issue description

When the debugger is paused inside a static function, the evaluator does not work at all,
instead, evaluating expressions causes the following behavior:
(1) The evaluator ignores its input and does not evaluate.
(2) Additionally, the debugger itself immediately continues running as if the user pressed "Continue".

Behavior (1) is an important feature I believe should exist, but behavior (2) is especially concerning as I have also observed it when triggering the bug that this PR fixed (happened to me in Godot 4.4.1.stable) meaning that possibly any bug other users will encounter with the evaluator might have unintended side effects.

Steps to reproduce

  1. Write a static function (any static function will do).
  2. Set a breakpoint inside the function.
  3. Evaluate any expression with the debugger evaluator.

Minimal reproduction project (MRP)

godot-evaluator-static-bugs.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions