Search Issue Tracker

Fixed in 1.1.3

Votes

47

Found in [Package]

1.1.0

Issue ID

1183165

Regression

No

[VSCode] A Script fails to open when External Script Editor is set to code.exe

Package: VS Code

-

How to reproduce:
1. Open the "VSCode_issue" project using the EnvIronman VM
2. Make sure the External Script Editor is set to code.exe
3. Open any script in the Project window

Expected results: A script is opened without any issues
Actual results: A script is not opened, code.exe is visible in the Task Manager

Reproducible with: 2019.2.0a12, 2019.2.7f2, 2019.3.0b4, 2020.1.0a5 (package ver. 1.1.0, 1.1.2)

Additional notes:
1. 2019.2.0a12 is the version where VSCode package has been introduced
2. After reproducing the issue, scripts won't open even when opening them directly via right-click -> Open With... -> Visual Studio Code
3. No Visual Studio Code instance may be visible in the Task Manager, but the cursor's spinning wheel animation will indicate that something is loading
4. The issue is reproducible with Visual Studio Code version 1.38.1 with Unity Debugger Extension enabled
5. The issue does reproduce when External Script Editor is set via Browse...-> <Path to code.exe>

Comments (13)

  1. Anthony0506

    Sep 28, 2019 20:17

    how are you setting it to use the .cmd file?

  2. mccann

    Sep 28, 2019 18:53

    Issue happened to me (2019.2.5). I tried a lot of different work arounds to no avail. Thanks for the workaround of using .cmd file option!

  3. Macklin

    Sep 19, 2019 09:31

    Adding some notes that aren't listed above, but might be worth mentioning:
    - Does not occur when setting the editor to code.cmd (in earlier versions you were required to open VSCode via the .cmd file, however in the current version, code.exe works fine and accepts command line parameters just as well).
    - Occurs regardless of the presence of parameters in Preferences.
    - Only occurs if VS Code is closed before attempting to open from Unity.
    - After reproducing the issue, a number of separate Code.exe processes are in fact visible in Task Manager, but only in the Details tab - not in the Processes tab. They have to be manually ended before another instance can be opened.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.