Open RosstheRoss opened 11 months ago
Did you try to setup explicitly the path to the executable of your vscode? From the same menu where you setup with which IDE you want to open scripts, you have another field "custom executable", what happens if you provide your custom visual studio code executable path here ?
It's better to support a new option ExternalEditorId.VsCodeInsider independantly, because we may have both code and code-insider installed at same time.
Did you try to setup explicitly the path to the executable of your vscode? From the same menu where you setup with which IDE you want to open scripts, you have another field "custom executable", what happens if you provide your custom visual studio code executable path here ?
That also does not work, I updated the issue to reflect that.
I am able to open with Visual Studio Code Insiders with the Dotnet > Editor Settings:
External Editor: Custom
Custom Exec Path: C:\Users\<UserName>\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe
Custom Exec Path Args: {file}
Editor Path Optional:
Did you try to setup explicitly the path to the executable of your vscode? From the same menu where you setup with which IDE you want to open scripts, you have another field "custom executable", what happens if you provide your custom visual studio code executable path here ?
That also does not work, I updated the issue to reflect that.
@RosstheRoss
In addition to setting the custom path to the editor you also have to set External Editor
to Custom
, otherwise the custom path doesn't take effect.
While this may seem obvious to most people, it wasn't obvious to me and I just learned it today.
Coming from Unity, if you have VSCode Insiders you have to point the Unity Editor to your custom path to VSCode first, then it will detect it as a vscode version and you have to make sure you now select this VSCode Insiders version specifically, as a custom editor won't cut it there. With a custom editor selected in Unity you wouldn't be able to create the project/solution files VSCode needs to properly handle the project code. Hence I assumed Godot would work similarly, but it doesn't.
Or in other words: Setting a Custom Exec Path
in Godot means the path only for the Custom
editor, it doesn't mean a custom path for one of the selected standard editor choices.
Godot version
v4.1.1.stable.mono.official [bd6af8e0e]
System information
Godot v4.1.1.stable.mono - Windows 10.0.25300 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.5009) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
Attempting to use the Visual Studio Code external editor option with only the Insiders version of Visual Studio Code installed fails with the following error:
Setting the
Custom Exec Path
to the location ofCode - Insiders.exe
does not work either.This is because VSCode insiders adds
-insiders
to its binary names. On my systemcode
does not exist butcode-insiders
does. A hacky workaround would be to symlinkcode
to point tocode-insiders
which worked on my machine.The naïve solution would be to add a copy of everything with
-insiders
to the array below. I have only tried this on Windows but I expect the pattern to be the same on any operating system.https://github.com/godotengine/godot/blob/5f1e56ff26be4070496aa51095b9ac2f2b4f4ed8/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs#L177
Steps to reproduce
Editor Settings > Dotnet > External Editor
toVisual Studio Code
.cs
fileMinimal reproduction project
N/A