Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Play in editor not work #63

Open
KarryCharon opened this issue Mar 9, 2024 · 2 comments
Open

MacOS Play in editor not work #63

KarryCharon opened this issue Mar 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@KarryCharon
Copy link

OS/device including version:

OS: MacOS Sonoma 14.3.1
GPU: M2 Max
RAM: 64GB

Issue description:

The Play in editor config cant run. No log found!
launch.json like that:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Play in Editor",
            "type": "godot-mono",
            "mode": "playInEditor",
            "request": "launch"
        },
        {
            "name": "Launch",
            "type": "godot-mono",
            "request": "launch",
            "mode": "executable",
            "preLaunchTask": "build",
            "executable": "/Users/xxx/Desktop/Godot 4.1.app/Contents/MacOS/Godot",
            "executableArguments": [
                "--path",
                "${workspaceRoot}"
            ]
        },
        {
            "name": "Launch (Select Scene)",
            "type": "godot-mono",
            "request": "launch",
            "mode": "executable",
            "preLaunchTask": "build",
            "executable": "/Users/xxx/Desktop/Godot 4.1.app/Contents/MacOS/Godot",
            "executableArguments": [
                "--path",
                "${workspaceRoot}",
                "${command:SelectLaunchScene}"
            ]
        },
        {
            "name": "Attach",
            "type": "godot-mono",
            "request": "attach",
            "address": "localhost",
            "port": 23685
        }
    ]
}

Screenshots of issue:

@KarryCharon KarryCharon added the bug Something isn't working label Mar 9, 2024
@raulsntos
Copy link
Member

It looks like you are trying to use the extension with Godot 4.x. This extension does not support Godot 4.x, only 3.x.

To debug in Godot 4.x, use the Microsoft C# extension and configure your launch.json file to launch the Godot binary, here's an example:

{
    "version": "2.0.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "/Users/xxx/Desktop/Godot 4.1.app/Contents/MacOS/Godot",
            // See which arguments are available here:
            // https://docs.godotengine.org/en/stable/getting_started/editor/command_line_tutorial.html
            "args": [
                "--path",
                "${workspaceRoot}"
            ],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false,
            "console": "externalTerminal"
        }
    ]
}

@KarryCharon
Copy link
Author

@raulsntos Thank you very much for your reply. It works now, but the preLaunchTask item should be delete else stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants