Skip to content

Instantly share code, notes, and snippets.

@goodjob1114
Last active January 22, 2016 14:30
Show Gist options
  • Save goodjob1114/231c5edf2e15a9d83662 to your computer and use it in GitHub Desktop.
Save goodjob1114/231c5edf2e15a9d83662 to your computer and use it in GitHub Desktop.
golang vscode devtool .... on linux & MacOS for Gophers

install go version 1.5 first ... Important

open url and download VSCode (https://github.com/Microsoft/vscode)

open https://code.visualstudio.com/download

unzip

# 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
# Linux
git clone git@github.com: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 git@github.com: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

run VSCode

# Linux
cd $software_folder
ln -s VSCode-linux-x64 VSCode && cd VSCode
./Code
# MacOS
open /Applications/Visual\ Studio\ Code.app
# 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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment