Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visual studio code integration

Discussion in 'Code Editors & IDEs' started by Hermonirr, Feb 6, 2020.

  1. Hermonirr

    Hermonirr

    Joined:
    Dec 23, 2013
    Posts:
    56
    Visual Studio Code 1.41.1 stopped launching with a double click on a .cs in Unity 2019.2.9f1. I get these errors:

    Code (CSharp):
    1. [VSCode] Code executable in 'C:\Program Files\Microsoft VS Code\bin\code.cmd' not found. Check yourVisual Studio Code installation and insert the correct path in the Preferences menu.
    2. UnityEngine.Debug:LogError(Object)
    3. dotBunny.Unity.VSCode:PrintNotFound(String) (at Assets/VSCode/Plugins/Editor/VSCode.cs:798)
    4. dotBunny.Unity.VSCode:AutodetectCodePath() (at Assets/VSCode/Plugins/Editor/VSCode.cs:443)
    5. dotBunny.Unity.VSCode:get_CodePath() (at Assets/VSCode/Plugins/Editor/VSCode.cs:59)
    6. dotBunny.Unity.VSCode:UpdateUnityPreferences(Boolean) (at Assets/VSCode/Plugins/Editor/VSCode.cs:1194)
    7. dotBunny.Unity.VSCode:.cctor() (at Assets/VSCode/Plugins/Editor/VSCode.cs:314)
    8. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[]) (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:108)
    9.  
    10. [VSCode] Code executable in 'C:\Program Files\Microsoft VS Code\bin\code.cmd' not found. Check yourVisual Studio Code installation and insert the correct path in the Preferences menu.
    11. UnityEngine.Debug:LogError(Object)
    12. dotBunny.Unity.VSCode:PrintNotFound(String) (at Assets/VSCode/Plugins/Editor/VSCode.cs:798)
    13. dotBunny.Unity.VSCode:CallVSCode(String) (at Assets/VSCode/Plugins/Editor/VSCode.cs:455)
    14. dotBunny.Unity.VSCode:OnOpenedAsset(Int32, Int32) (at Assets/VSCode/Plugins/Editor/VSCode.cs:968)
    15. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    16.  
    Thanks for any help
     
  2. Akraticus

    Akraticus

    Joined:
    Jul 12, 2015
    Posts:
    1
    I got that same message when I had uninstalled VS Code, but the preference was still set to using VS Code.

    If your VS Code is installed, then use the Browse option in the preference dropdown to navigate to Code.exe. If that doesn't work, reinstall VS Code. If that doesn't work, reinstall Unity. If that doesn't work, cry.
     
    Raul_T likes this.
  3. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Sorry for offtopic, but this made my day :D
    (Also relatable lately for a lot of other unity stuff unfortunately...)
     
  4. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    You many need to update your VS Code package to 1.1.3 if you haven't already.