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

Plugin does not rebuild project upon launching game via debug configuration #7

Open
Pkshields opened this issue Jul 26, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Pkshields
Copy link

OS/device including version: macOS 10.15.5
Godot version: v3.2.2.stable.mono.official
VSCode version: 1.47.2

Reproduction details:

  1. Create a Godot C# launch.json via VSCode's debug view.
  2. Configure the Launch configuration with the correct path to the Godot executable
  3. Run the game via the Launch configuration, then close the game.
  4. Add a Console.WriteLine line to a method on any attached script in the main scene.
  5. Run the game via the Launch configuration again.

Expected: Any changes made to a script will be included when you launch the game via VSCode's debugger.
Actual: The project is not rebuilt when launching the game and the contents of the Console.WriteLine will not be printed to the debug output.

Notes:
The same behaviour is noticed when running the Godot via the command line. Running Godot --path <PATH_TO_PROJECT> directly does not pick up any changes to a C# script. If I run msbuild <PROJECT>.sln first however, the script changes will then be picked up by the Godot command.

@Pkshields Pkshields added the bug Something isn't working label Jul 26, 2020
@myuniquename
Copy link

If anyone looking for workaround: you can create a build task and add use it as prelaunch task.
My configurations for MS Windwos looks like:
tasks.json
{ "version": "2.0.0", "tasks": [ { "label": "mybuild", "command": "dotnet.EXE", "args": [ "msbuild", "${workspaceRoot}/C Sharp.sln", "/t:Build" ], "type": "shell", "problemMatcher": [], "group": { "kind": "build", "isDefault": true } } ] }
launch.json
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Play in Editor", ... }, { "name": "Launch", "type": "godot-mono", "request": "launch", "mode": "executable", "executable": "${workspaceRoot}/Godot.exe", "executableArguments": [ "--path", "${workspaceRoot}" ], "preLaunchTask": "mybuild" }, { "name": "Attach", ... } ] }

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