godot-vscode-plugin icon indicating copy to clipboard operation
godot-vscode-plugin copied to clipboard

Opening a file through Godot doesn't work if opened using "Open workspace with Godot Editor"

Open rktprof opened this issue 11 months ago • 0 comments

Godot version

4.2.1

VS Code version

VSCodium 1.87.2

Godot Tools VS Code extension version

2.0.0

System information

macOS 14.4

Issue description

When opening Godot though the "Open workspace with Godot Editor" button in VSCode you can't open script files using the FileSystem browser (or "Quick Open...") in the editor, the terminal in VSCode prints this error:

node:internal/modules/cjs/loader:1087
                                       throw err;
                                                   ^

                                                    Error: Cannot find module '/Users/rktprof/Documents/Projects/test-project'
                                 at Function._resolveFilename (node:internal/modules/cjs/loader:1084:15)
         at node:internal/modules/cjs/loader:929:27
                                                       at Function._load (node:electron/js2c/node_init:2:13357)
                at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
      at node:internal/main/run_main_module:23:47 {
                                                     code: 'MODULE_NOT_FOUND',
                                                                                requireStack: []
                                                                                                }

                                                                                                 Node.js v18.17.1

Steps to reproduce

  • Open Godot
  • Open a script file using the FileSystem browser -> VSCode will open that file
  • Close Godot
  • Open Godot using the "Open workspace with Godot Editor" that shows up in VSCode
  • Open a script file using the FileSystem browser like before -> VSCode Terminal will print the error above

rktprof avatar Mar 15 '24 09:03 rktprof