open url and download VSCode (https://github.com/Microsoft/vscode)
open https://code.visualstudio.com/download
# Linux
software_folder=/your/software/folder
mv VSCode-linux64.zip $software_folder && cd $software_folder
unzip VSCode-linux64.zip
rm VSCode-linux64.zip
# MacOS
software_folder=/Applications
cd ~/Downloads
mv VSCode-darwin.zip $software_folder && cd $software_folder
unzip VSCode-linux64.zip
rm VSCode-linux64.zip
install go debug tools (https://github.com/derekparker/delve) (https://github.com/derekparker/delve/wiki/Building)
# Linux
git clone [email protected]:derekparker/delve.git && cd delve
go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
GO15VENDOREXPERIMENT=1 make install
cd ..
# MacOS
open /Applications/Utilities/Keychain\ Access.app
# (Apple::Header) => Keychain Access => Certificate Assistant => Create a Certificate...
# Choose a name (dlv-cert in the example),
# set “Identity Type” to “Self Signed Root”,
# set “Certificate Type” to “Code Signing” and
# select the “Let me override defaults”. Click “Continue”.
# extend the predefined 365 days period to 3650 days.
# “Continue” * n ...
# until you get to the “Specify a Location For The Certificate” screen,
# then set “Keychain to System”.
# In keychains select “System”, and
# you should find your new certificate. Use the context menu for the certificate, select “Get Info”, open the “Trust” item, and set “Code Signing” to “Always Trust”.
# [At least on Yosemite:] In keychains select category Keys -> dlv-cert -> right click -> GetInfo -> Access Control -> select "Allow all applications to access this item" -> Save Changes.
# You must quit “Keychain Access” application in order to use the certificate and restart “taskgated” service by killing the current running “taskgated” process.
# Alternatively you can restart your computer.
# restart “taskgated” or restart your computer
# After Restart Service, Run the following... which will install the binary and codesign it.
git clone [email protected]:derekparker/delve.git && cd delve
go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv
GO15VENDOREXPERIMENT=1 CERT=dlv-cert make install
# Linux
cd $software_folder
ln -s VSCode-linux-x64 VSCode && cd VSCode
./Code
# MacOS
open /Applications/Visual\ Studio\ Code.app
install go extension (https://github.com/Microsoft/vscode-go)
# Linux
[Ctrl] + [Shift] + p
install [enter]
go [enter]
Go [Mouse Hover], then [click]
# MacOS
[Cmd] + [Shift] + p
install [enter]
go [enter]
Go [Mouse Hover], then [click]