VScode for Golang - How to setup Visual Studio Code for Go [2020]

preview_player
Показать описание

In this video we will look at how to setup visual studio code (VScode) for golang development. We will install necessary tools, the gopls language server, debugging, running your code, and more!

#johncodes

🚀 SUMMARY:
Today, we're going to talk about using vscode with golang. The golang extension is a powerful tool to use with go development and provides alot of great features. Included with the golang extension is the gopls langauge server which provides fast performance for intellisense, completions, documentation, and more. It also has best in class go module support. If you're using vscode for golang work, you'll want to enable the gopls server. We will also talk about a few other extensions that make working with vscode much better. Again, vscode is highly extensible and customizable. It's a powerful tool to use in your day to day work!

⏰ TIMESTAMPS:
00:00 Intro
00:30 Install tools & Go
02:59 Go extension configuration
05:48 Go extension features
06:30 Run tests
07:24 Building binaries
07:42 Debugging
10:41 More extensions

🔗 SOCIAL LINKS:

🤔 About:
Hi all, I’m John, an experienced software engineer and open source software enthusiast. I make fun and informative videos about tech, engineering, productivity, and life! Like, comment, and subscribe for more!
Рекомендации по теме
Комментарии
Автор

Hey all - VScode as of ~Feburary 2021 now enables the gopls server by default and much of the documentation has now moved into the upstream "golang" github org. So this video is a bit out of date.

JohnCodes
Автор

what a cute chipmunk. the one with glasses. dude took Gopher impersonation too seriously

milkyway
Автор

I'm reading the doc - it says "VS Code Go extension now enables the gopls language server by default", and it seems we no longer need to do anything!

GolangDojo
Автор

Hey John! Im having problems with inputting in Go on VS code so i thought i didnt set up properly. I can input something, but after i do, i get this error noDebug mode: unable to process 'evaluate' request.

Im kinda stuck at 4:24, for one thing, the link you provided doesnt exist anymore, and when i try to manually input the settings in the settings.json tab, it just doesnt work. Please help! Loving your content so far!

evinwoon
Автор

I already have visual studio .... So can I directly install the extention for go and run code or Else I have to install first go ? Pl tell..

amrutnikam
Автор

VScode golang extension JSON configuration on gitub is missing. Not on the website anymore

billionairepodcast
Автор

Hey all! Thanks for watching! Hope you enjoy using vscode with golang - let me know what you want to see covered next with Golang!!

JohnCodes
Автор

sidhi bat no bakawas its mean say straight forward point to point thank bro

Indian-.TT
Автор

do you know how to work with microsrvices in golang? what I want to do is open a workspace folder with all my microservices and start working in a simple instance in VS Code instead of having a new VS Code instance for each microservice, I am able to open the workspace but it shows a lot of errors in each .go file in the import sections, I think I need to configure something about go modules (go.mod) in every microservice but I don't know what :(

eltirad
Автор

Thanks man this was really useful for setting up vs code for Go.

khazaryahu
Автор

Does this still need to be done in the current year?

manofqwerty
Автор

super helpful! wish you channel grows fast. Here's a sub.

kunafeh
Автор

For 2022, install the extension as said and almost everything comes by default. But if you run a hello world it will appear an error like " go.mod file not found in current directory or any parent directory; see 'go help modules' " you fix it in the terminal with the command "go env -w GO111MODULE=off" and thigs should work fine. As for testing, you need to create the launch.json first, the promt as shown in the video doesn't show again. After creating that file that should be automatic then you can run the test as in the video.

pietergleixner
Автор

Thank you! My golang intellisense was sooo slow, but you have fixed it <3

MrTornnado
Автор

whenever i try to update or install gopls extension vs code always gives me the following error
could not import debug/elf (EOF)

sameeralikhan
Автор

Thanks a lot as short video covering debugging

जैराधाकृष्ण
Автор

Hi John, I was thinking to learn NodeJs as I am a frontend React developer. Now I am thinking to get hands-on experience with golang instead of NodeJs. My system has i3 2nd gen processor with 6gb RAM and no external graphics card support. Can I start learning with this laptop? And I want to watch your new video series on golang. I am new to it.

damo
Автор

I'm getting an error saying " Failed to launch: could not launch process: can not run under Rosetta, check that the installed build of Go is right for your CPU architecture... where it wants me to launch.json ; what do I do? Mac m1 mini with rosetta

dylankawalec
Автор

Just want to ask is it possible to input when I use vscode debugmod on vscode?

paverschlev
Автор

And what about the workspace? This is the first thing I'm asked from studio... You don't even mention it aut you're presenting a code before defining a workspace?

kayax
join shbcf.ru