<p>Hi everyone:</p>
<p>I am just learning Go, and I realize that certain things are not completely obvious, like the best way to set up debugging. Can you walk through the specific ways you've set up VSCode for Go -- including what you decided to do for debugging?</p>
<p>Are there any other tips or tricks you have adopted to increase your productivity? (For example, a frequent point of complaints is that when commenting out code, compilation is halted if variables are only used a single time in the remaining code, for example. But a script can solve these, or other issues -- so if you use any such helper things, it would be nice to tell me about it.)</p>
<p>I am trying to set up a streamlined Go process based on any feedback from how others have done it. Go is extremely productive and I've only heard about one or two things - so my goal is to learn if anyone has solved these for themselves.</p>
<p>Thank you.</p>
<hr/>**评论:**<br/><br/>tristan957: <pre><p>Download the Go extension</p></pre>steffen25: <pre><p>Hey I dont know if this will help you but I remember campoy have this go tooling video that include go debugging with delve <a href="https://youtube.com/watch?v=uBjoTxosSys" rel="nofollow">https://youtube.com/watch?v=uBjoTxosSys</a> anyway it shows other cool go tools that is definitely worth to use in your go environment :) </p></pre>gomaleck13: <pre><p>With vscode I have done nothing more than downloading the go extension. The only complaint I have had is it is slow to find implementations of an interface or perform a refactor. Gogland offers improvements in this area, but it is much more resource intensive.</p></pre>sethammons: <pre><p>vs code will handle auto imports for you. If you comment out something and the import is no longer needed, it auto goes away. As for variable usage, you can get rid of unused variable errors by just adding '_ = theVariable' on the line after it. You can remove that line later. I tried wiring up the debugger a long time ago and failed. It is supposed to be easy now. I get pretty far with log statements and a verbose flag. I should look back into the debugger.</p></pre>Heyoni: <pre><p>Can I just say that I've been using golang EAP and setting up the debugger was a breeze. It incorporates dlv (delve) into the GUI really nicely. I think it's free for now but will cost money once version 1.0 is out.</p></pre>nhooyr: <pre><p>I think you mean gogland and I completely agree. Replaced Neovim for me for go programming.</p></pre>iroflmaowtf: <pre><p>VSCode is highly inefficient, uses tons of memory for each opened file, I recommend looking at liteide</p></pre>sin2pifx: <pre><p>Documentation seems limited.</p></pre>iroflmaowtf: <pre><p>for what exactly?</p></pre>sin2pifx: <pre><p>Everything. Even installing is badly documented: it's just a link and it's anybody's guess what you have to download. Change logs seem to be have been left untranslated. </p>
<p>There is no documentation about the editor, just some technical things about environment (and at least one image is missing) in bad English. This is the first sentence</p>
<blockquote>
<p>LiteIDE build config default use -i flag, if use Go1.1 or Go1.2 not support</p>
</blockquote>
<p>What does that mean?</p>
<p>It didn't recognize my $GOPATH, and there's no way to find out where that's set. It's not in the preferences. Turns out it's a button in the tool bar, but I had to find out myself. What the other buttons do? No idea. How to build or run a project? How to run it with different arguments? Etc.</p>
<p>These things matter. If someone looks up liteide and there is not enough information, they'll stop using it.</p></pre>iroflmaowtf: <pre><p>did you try to get it from <a href="https://sourceforge.net/projects/liteide/files/X32.2/" rel="nofollow">here</a>?</p>
<p>there's a learning curve, no doubt, I think that's the case with every tool</p>
<blockquote>
<p>If someone looks up liteide and there is not enough information, they'll stop using it.</p>
</blockquote>
<p>it's your choice of course</p></pre>sin2pifx: <pre><p>Yes, that's what I got.</p>
<blockquote>
<p>it's your choice of course</p>
</blockquote>
<p>I've tried it a bit, and it's a fast editor. Everyone who works on an underpowered laptop, should give it a try. A lot of work has been put in this tool, and it would be a shame if people discarded it because the documentation is lacking.</p></pre>Hexodam: <pre><p>I'm trying to switch from LiteIDE to VSCode because thats what the cool kids are using and as much as I like the VSCode editor better than LiteIDE the whole simplicity and features of LiteIDE are hard to beat.</p>
<p>Everyone who is starting out with Go should start with LiteIDE, takes so much pain away.</p></pre>iroflmaowtf: <pre><blockquote>
<p>VSCode because thats what the cool kids are using</p>
</blockquote>
<p>I hear ya</p>
<p>agree</p></pre>comrade-jim: <pre><p>By pretty much all bench marking standards VSCode is an inferior editor.</p>
<p>The reason you hear about it so much is because Microsoft pays a marketing team (shills) to market the editor in programming communities. </p></pre>throwawaybeginr: <pre><p>This seems unlikely. Could you point to an actual example?</p></pre>sethammons: <pre><p>I was using sublime before vs code. I didn't care for atom. I moved to vs code after about 30 seconds of use programming Go with it. Functionality and features won me over. </p></pre>Killing_Spark: <pre><p>Inferior to what exactly? I thought its better then atom at least </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传