NEW UPDATED VERSION OF THIS VIDEO FOR 2022!!!!! ---->> kzbin.info/www/bejne/pqfJdoaJdseVqtU
@JohnCodes3 жыл бұрын
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. But, there are still some useful tidbits around enabling debugging, some of the settings, etc. Checkout the official repo for more documentation: github.com/golang/vscode-go
@nagendrapatel74043 ай бұрын
Nice and detailed one. Very helpful.
@billionairepodcast3 жыл бұрын
VScode golang extension JSON configuration on gitub is missing. Not on the website anymore
@JohnCodes3 жыл бұрын
Right - alot's changed since I made this. Many of the settings have moved out of the "beta" state. Check out the official github for configuration settings: github.com/golang/vscode-go
@GolangDojo3 жыл бұрын
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!
@hedobeagamer23403 жыл бұрын
That must explain why the page for the JSON settings doesn't exist anymore in the repo
@JohnCodes3 жыл бұрын
Excatly!! Alot's changed since I made this. Check the official github for configurations: github.com/golang/vscode-go
@khazaryahu4 жыл бұрын
Thanks man this was really useful for setting up vs code for Go.
@JohnCodes4 жыл бұрын
Glad it helped!
@evinwoon68092 жыл бұрын
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!
@amrutnikam56432 жыл бұрын
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..
@eltirad02 жыл бұрын
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 :(
@sameeralikhan5133 Жыл бұрын
whenever i try to update or install gopls extension vs code always gives me the following error could not import debug/elf (EOF)
@manofqwerty2 жыл бұрын
Does this still need to be done in the current year?
@milkyway92253 жыл бұрын
what a cute chipmunk. the one with glasses. dude took Gopher impersonation too seriously
@JohnCodes3 жыл бұрын
it meee
@rumpeldrump2 жыл бұрын
why not use the build-in terminal?
@pietergleixner39942 жыл бұрын
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.
@mikecon40972 жыл бұрын
Hi Pieter, can you pls share your launch.json setting file, for me, it's not working, saving files is taking years, the entire system is getting slow on saving, and also your settings.json for go Thank you
@pietergleixner39942 жыл бұрын
@@mikecon4097 Hi, first, I made a major mistake, DO NOT use the command "go env -w GO111MODULE=off" it will ruin future projects. Every project start with "go init mod " the setting JSON file should be auto-generated. Start your project on the main.go (or the main file of your project) with F5 for debugging. If you don't do that it will launch an error to configure the JSON file I mention, you don't want that.
@_waysmall_2 жыл бұрын
This helped me in 2022. 😁😁
@kunafeh4 жыл бұрын
super helpful! wish you channel grows fast. Here's a sub.
@JohnCodes4 жыл бұрын
Thank you very much!! Appreciate it
@Ankit-df8rw2 жыл бұрын
I installed the same theme...but not able to get the same appearances...can anyone help one plz?
@AnubhavLatiyan Жыл бұрын
bro is there any offline installer for go tools?
@MrTornnado4 жыл бұрын
Thank you! My golang intellisense was sooo slow, but you have fixed it
@JohnCodes4 жыл бұрын
Awesome!! Glad this was useful!!
@philip94893 жыл бұрын
The Link for "VScode golang extension JSON configuration" is outdated/ unavailable
@JohnCodes3 жыл бұрын
Yeah, alot has changed since I made this video. For one, the gopls server is no longer in "beta" so alot of the settings have also changed. Check out the official github for configurations: github.com/golang/vscode-go
@महात्मा-गांधी-असली-वाले3 жыл бұрын
sidhi bat no bakawas its mean say straight forward point to point thank bro
@dylankawalec35173 жыл бұрын
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
@JohnCodes3 жыл бұрын
Sounds like you might have the wrong version of Go for your M1 mac. I'm not sure if Go is supported on the new ARM architecture macs.
@paverschlev983 жыл бұрын
Just want to ask is it possible to input when I use vscode debugmod on vscode?
@JohnCodes3 жыл бұрын
Hmmmm I'm not sure - I doubt it
@JohnCodes4 жыл бұрын
Hey all! Thanks for watching! Hope you enjoy using vscode with golang - let me know what you want to see covered next with Golang!!
@khazaryahu4 жыл бұрын
Hi John, I have seen in some websites that Golang is the language of the cloud, Can you do your next video about "how to get started in cloud computing domain using Golang 🤔"
@JohnCodes4 жыл бұрын
Great idea! I'll see what I can do!
@exit-zero4 жыл бұрын
Great job mate
@JohnCodes4 жыл бұрын
Thanks much!
@jianlu98413 жыл бұрын
I was trying to install those extensions and it said "cannot install go tools. set either go.gopath or go.toolsgopath in settings."
@JohnCodes3 жыл бұрын
You'll need your go path set. This _should_ get set automatically when you install go on your system. Make sure you have go setup and installed correctly.
@carlosazurmendi69183 жыл бұрын
my go.mod file doesn't have a red go icon
@JohnCodes3 жыл бұрын
Hmmmm you might need to get a different icon plugin - there are lots and lots!
@kayax014 жыл бұрын
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?
@JohnCodes4 жыл бұрын
Good question! With Visual Studio code, you can open any directory or folder without having to define a workspace. And for Go, you can open some ".go" files and get started without having to get a workspace up and running!
@जैराधाकृष्ण3 жыл бұрын
Thanks a lot as short video covering debugging
@JohnCodes3 жыл бұрын
You are most welcome!!!
@CikaVuksan3 жыл бұрын
How to setup auto run when I save changes?
@JohnCodes3 жыл бұрын
There's a setting for that. You want the "go.buildOnSave" setting
@SarveshBhatnagar12143 жыл бұрын
vscode settings link not found. That needs to be upgraded but great video overall.
@stanislavdimitrenko3 жыл бұрын
I think you don't need it now. I work without it settings.
@JohnCodes3 жыл бұрын
Yes, VScode has moved around some of their repositories. The gopls beta is now more integrated into the plugin. Try this link: github.com/golang/vscode-go
@damo1904 жыл бұрын
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.
@JohnCodes4 жыл бұрын
That laptop should be fine :) but might be a little slow. If you upgraded to an i5, that would be more than enough. Give it a try and see how it works!!
@cal16864 жыл бұрын
gopls doesn't work for me. I get couldn't find import when using vscode for module.
@JohnCodes4 жыл бұрын
Hmmmm - interesting, might be worth opening an issue with the vscode go tools. Again, gopls is still in beta so it could be rough around the edges.
@cal16864 жыл бұрын
@@JohnCodes Yeah, good idea. I noticed that I only had the problem when I was using vscode workspaces. It's fine if you just open a folder. Although, I don't know how to confirm it's using gopls vs. the built in.
@kunafeh3 жыл бұрын
May I know what software you use to make these videos? Like simultaneous capturing of your screen and video. It's pretty neat!
@JohnCodes3 жыл бұрын
Thanks! OBS is what I use
@sm51723 жыл бұрын
Very useful, thank you. You have great presentation skills.
@JohnCodes3 жыл бұрын
Thank you! Appreciate that
@abraaocarvalho45054 жыл бұрын
What is the theme of your vscode ? Is beautiful.
@JohnCodes4 жыл бұрын
I believe this is one of the "One Dark" themes. I also frequently bounce around the various "Monokai" themes. It's nice since they are so easy to install and switch between
@parthjoshiastron4 жыл бұрын
Hey John, Cool video. I couldn't get the definition (F12) thing working, any suggestions?
@JohnCodes4 жыл бұрын
Good question - the Gopls server is still in beta, so they definitely have some bugs to iron out. A re-install may do the trick. If you open the command palette and "Go: install tools" you can re-check gopls. Also, make sure that your gopath and your whole go environment is set up correctly. And if you're still running into issues, may be worth opening an issue on github
@parthjoshiastron4 жыл бұрын
@@JohnCodes Thanks, will try that.
@JohnCodes4 жыл бұрын
@@parthjoshiastron Good luck!
@theflymo4 жыл бұрын
Great video, very useful, thanks!
@JohnCodes4 жыл бұрын
My pleasure! Glad it was useful!!!
@Theuser20223 жыл бұрын
Just here to say I'm the 888th subscriber :D
@JohnCodes3 жыл бұрын
Woot wooooot! Thanks much! Already past 1k :D
@corey7954 жыл бұрын
Thanks!
@JohnCodes4 жыл бұрын
You’re welcome!!
@diansaputra75754 жыл бұрын
Thanks broo!!
@JohnCodes4 жыл бұрын
No problem!! My pleasure
@guents3 жыл бұрын
Thanks for the content. I think vscode can be nice for a small project, but on a big project you can see some weird behavior. Debugging throws weird exceptions, breakpoints in go routines work randomly (sometimes it stops sometimes it doesn't), watches don't work most of the time, even watching a long string is difficult. When you have many files, suggestions don't work anymore and sometimes you can't even save a file. Overall i think it is difficult to do some serious programming in vscode.
@JohnCodes3 жыл бұрын
Yeah I agree. I've actually moved to a mostly vim workflow for speed and efficiency. For really beastly projects I might pull up intelij (especially for kotlin and java projects). But VScode is great for short quick things like JSON / yaml editing
@georgesmith91783 жыл бұрын
What is your favorite IDE for developing in Go?
@sharpals22273 жыл бұрын
Great video
@JohnCodes3 жыл бұрын
Thanks much! Appreciate it
@jimxu19633 жыл бұрын
your startup screen of vscode is full of “learning rust” projects… interesting… :)
@JohnCodes3 жыл бұрын
...... you caught me LOL
@molekuax86463 жыл бұрын
Thanks man
@JohnCodes3 жыл бұрын
No problem!
@Nexus-rt1bm4 жыл бұрын
Thank you
@JohnCodes4 жыл бұрын
You’re welcome!!
@Nexus-rt1bm4 жыл бұрын
Hey could you share your vscode theme?
@RP-mo2md3 жыл бұрын
You are jumping from one subject to another skipping steps.
@JohnCodes3 жыл бұрын
Thanks for the feedback! This was one of the first tutorial type videos I did and I've been working on improving my skills here - again, thanks for the feedback!