I install Visual Studio Code for MacOS and installed the code command to the shell via the GUI.
Now, when I try to execute this command, I get the following error:
LSGetApplicationForInfo() failed with error -10814 while trying to determine the application with bundle identifier com.microsoft.VSCodeInsiders.
I have no idea what is the cause of this. I found that a function code has also been created and that if I remove it with unset code once, I can then run code in the shell and VSCode will launch correctly. Every reboot bring back this function though...
The code function is:
# type code
code is a function
code ()
{
VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCodeInsiders" --args $*
}
What is the problem? What am I supposed to do here?

unset codemakes it work, it means you have a function namedcodeeither in system profile or in your local profile. You can still execute VSCode without unsetting the function code by runningcommand code. This will execute the script and not the function. But I suggest getting rid of the function code.