Skip to content

External Editor line flag differs in behavior from internal editor #100832

Closed
@bvnanana

Description

@bvnanana

Tested versions

  • Tested in Godot v4.3.stable.official [77dcf97]
  • Reproducible in both VSCode and SublimeText
  • Unsure if it applies to any other editor

System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - AMD Radeon(TM) Vega 8 Graphics (Advanced Micro Devices, Inc.; 31.0.12027.9001) - AMD Ryzen 3 3200G with Radeon Vega Graphics (4 Threads)

Issue description

When using a external editor, files open 1 line before the expected line while debugging. Compare:

Image

Image

This happens with the official VSCode settings as well, which is why I tried a different one here.

I'm unfamiliar with how this works internally, but this seems to be the line that replaces the flag for the external editor:

flags = flags.replacen("{line}", itos(p_line > 0 ? p_line : 0));

And I found this case where it is being modified:

EditorDebuggerNode::get_singleton()->set_breakpoint(scr->get_path(), p_line + 1, p_enabled);

It didn't seem like it was possible to modify the line flag directly in the editor settings in way (like adding a +1)

Steps to reproduce

  • Configure a project with an external editor, like VSCode
  • Use External Editor for Debugging
  • insert a breakpoint at any line
  • see the wrong line being open

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions