VisualStudioCodeArduino
VisualStudioCodeArduino copied to clipboard
Installation procedure on OSX?
Hi -- Apparently I'm Mac-challenged. I can't make sense of the installation procedure in the context of installing on Mac.
I've got the Arduino.app installed in /Applications, but I'm unsure how to create the symlinks etc to the build environment. Anyone help?
-- found solution: Making the symlink to the Arduino on OSX is as follows. This should be reflected in the documentation.
sudo ln -s /Applications/Arduino.app/Contents/MacOS/Arduino arduino
I also faced some issue on OS X. I kept on receiving
Failed to launch external program arduino . spawn arduino ENOENT
For some reason, creating a symbolic link with sudo ln -s /Applications/Arduino.app/Contents/MacOS/Arduino arduino did not solve my problem.
However, I found a workable solution. In tasks.json, replace:
"command": "arduino",
by
"command": "/Applications/Arduino.app/Contents/MacOS/Arduino",
It worked like charm for me
The instructions here need to be updated to reflect the newer version(s) of OS X, and there could be more clarification for a few of the instructions....but I was eventually able to figure it out.
After creating the Alias, I get the error "MainClassNameRequired" when doing the test procedure to determine if the Arduino IDE will launch. I enter the command 'arduino' in the terminal window and get the error message I mentioned.
However...using the instructions from @the-bbo by editing the tasks.json file, it worked! The 'test' of trying to launch using the 'arduino' command from the command line still fails, but within VSC it works just fine.
Thanks!!
Thanks, that worked for me also.
However as an alternative to hardcoding the path in the JSON file you can can create the shell script in the usr/local/bin director, set the permissions correctly, and the plugin will work without modifying tasks.json. (A side effect is any other apps using that link should also work)
Create shell script
echo 'exec /Applications/Arduino.app/Contents/MacOS/Arduino "$@"' >> /usr/local/bin/arduino
Modify group and permissions
sudo chgrp wheel /usr/local/bin/arduino
sudo chmod 755 /usr/local/bin/arduino
It looks like the underlying issue is variables being passed through a symbolic link or alias. I tried creating an alias instead of a link and had the same issue.
http://stackoverflow.com/questions/36666279/os-x-arduino-1-6-8-cli-mainclassnamerequired
Thanks to all of you! After trying the simlink and alias way, both of the solutions proposed here worked for me (macOS El Capitan 10.11.2). Maybe it's time to make a pull request adding those workarounds into the main README.md ?
PS: is "$@"
a way for passing all args to the Arduino binary?