Skip to content

[LTS 26.1-rc.1] Closing debug window while Auto Accept Quit is off does not end debugging. #1165

@swashdev

Description

@swashdev

Tested versions

Reproducible in:

  • 26.1-rc.1 [403afcf]
  • 26.1-beta.0 [dcb00066f]

System information

Redot v26.1.rc.1 - Windows 10 (build 19045) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce GTX 1650 with Max-Q Design (NVIDIA; 32.0.15.6094) - 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 threads) - 15.70 GiB memory

Issue description

In a project with Auto Accept Quit turned OFF, running the project in the editor and then closing the window does not stop debugging mode unless a scene scripted to handle quit requests is active. This means that, if the user wants to handle quit requests in their main scene, but a different scene is being tested, closing the window will not stop debugging.

In 26.1-rc.1 in particular, the debugging window remains open without window decorations until debug mode is disabled manually using the Stop button, which is how I initially noticed this bug.

Steps to reproduce

  1. Create a new project in Redot Engine LTS 26.1-beta.0 or -rc.1
  2. In Project Settings, set application/config/auto_accept_quit to False.
  3. Run the project.
  4. Attempt to close the window. The window should remain open (in 26.1-rc.1) but without window decorations. Debugging mode will not have stopped.
  5. Add a script to handle quit requests, such as in the example below or in the provided MRP.
  6. Repeat steps 3 and 4. Debugging mode should now stop without issue.
func _notification(what: int) -> void:
	if what == NOTIFICATION_WM_CLOSE_REQUEST:
		print_debug("Received a quit request.")
		get_tree().quit(0)

Minimal reproduction project (MRP)

This project contains two scenes, main.tscn and bug.tscn. main.tscn has a script attached which handles quit requests, but bug.tscn does not. Running the project normally and closing the window should display the intended behavior, but opening bug.tscn using the "Run Current Scene" or "Run Specific Scene" buttons should reproduce the error. You can also set bug.tscn as the main scene.

mrp-debug-close-window.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions