I installed the free Wolfram Script and Wolfram Engine on my Mac (I do not have Mathematica), and I generated free activation keys. After entering these keys into the terminal, I am able to run
wolframscript from the terminal successfully. E.g. with a file
filename.wls with contents
Print["Hello world"];, I can run
wolframscript -f filename.wls and everything runs smoothly. Wolframscript is located at
In visual studio code, I installed the Wolfram Language extension. Syntax coloring works well, but other things do not (e.g. documentation on hover). Most importantly though, I cannot get the kernel to work. In the
settings.json file, I added
"wolfram.kernel": "/Applications/WolframScript.app/Contents/MacOS/wolframscript". Now, when I open
.wls files in Visual Studio Code, I get the following error five times:
Connection to server got closed. Server will restart.
The Wolfram Engine could not be activated using your Wolfram ID.
This may have occurred because WolframScript has already activated a different installation of the Wolfram Engine using your account's limited free activation keys. Only two keys are generated when you create a free Wolfram Engine license using https://www.wolfram.com/engine/free-license/.
For additional Wolfram Engine keys, contact Wolfram Research at https://www.wolfram.com/contact-us/.
I also tried changing
"/Applications/Wolfram Engine.app/Contents/MacOS/WolframKernel" and
"/Applications/Wolfram Engine.app/Contents/MacOS/Wolfram Engine". Both give the same error.
Why does everything work in my terminal but not in Visual Studio Code? How can I get all the features of the Wolfram Language vscode extension to work? Thanks!