godotengine / godotengine/godot-vscode-plugin

Current scene launch configuration reports wrong error in main scene unset

Open
#1,018 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

### Godot version

v4.6.2.stable.mono.official [71f334935]

### VS Code version

1.122.1

### Godot Tools VS Code extension version

2.6.1

### System information

Windows 11 Home

### Issue description

Attempting to create launch the project with `"scene": "current"` will show the following error:
> ALERT!
> Couldn't detect whether to run the editor, the project manager or a specific project. Aborting.

This only occurs if the main scene is _not_ set in the Godot project.

### Steps to reproduce

1. Ensure that the main scene in Godot project is blank. I.E. Project Settings > Application > Run > Main Scene.
2. Open launch.json in VS Code.
3. Create a new configuration with `"scene": "current"`. For example:
```
{
"name": "Run Current Scene",
"type": "godot",
"request": "launch",
"scene": "current",
"project": "${workspaceFolder}",
"additional_options": ""
},
```
4. Run and Debug with the configuration above.

### Actual Result
An error box pops up with the following information:
> ALERT!
> Couldn't detect whether to run the editor, the project manager or a specific project. Aborting.

### Expected Result
Either of the following would be an appropriate result:
- The current scene launches as normal, even though a main scene is not set.
- A dialog box with more appropriate information appears. At the very least, it should be the error one gets when they try to run the main scene while it is unset (default if no explicit scene configuration set):
> ALERT!
> Error: Can't run project: no main scene defined in the project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.