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 /Application/WolframScript.app/Contents/MacOS/wolframscript.

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 "wolfram.kernel" to "/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!

  • $\begingroup$ Did you check how many wolfram kernels are running? Maybe another process is already using it. $\endgroup$
    – Oscillon
    Aug 14, 2023 at 21:10

1 Answer 1


Reinstalling everything and changing "wolfram.kernel" to "/Applications/Wolfram Engine.app/Contents/MacOS/WolframKernel" fixed the problem.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.