当前位置:网站首页>一文搞定vscode编写go程序
一文搞定vscode编写go程序
2022-07-05 15:07:00 【dnice】
最初开始写go程序时使用的vscode,长时间不用快忘记了,现在抽时间整理出来,简洁明了,供大家参考。
1.安装Go插件

2.安装code runner

安装完成后,会发现,代码编辑页面右上角多了个运行按钮,编辑完成代码后直接点击运行按钮即可。不需要在终端输入go run命令了,提高编程效率。如下图:
3.debug
鼠标悬停Run -> 点击Start Debugging,如下图:
新项目debug,报错如下:
项目必须要先初始化 go mod,打开terminal go mod init,如下图:
设置断点,debug,一切正常,可以正常调试程序了。如下图:
以上步骤完成后,就可以编写go程序和debug了。
常用快捷补全关键字




其余的快捷补全,大家可以自己试一下,输入英文字母看是否有提示即可。
边栏推荐
- Brief introduction of machine learning framework
- Live broadcast preview | how to implement Devops with automatic tools (welfare at the end of the article)
- Reasons and solutions for redis cache penetration and cache avalanche
- Go learning ----- relevant knowledge of JWT
- 数学建模之层次分析法(含MATLAB代码)
- JS bright blind your eyes date selector
- What are CSRF, XSS, SQL injection, DDoS attack and timing attack respectively and how to prevent them (PHP interview theory question)
- Cartoon: what are the attributes of a good programmer?
- 可转债打新在哪里操作开户是更安全可靠的呢
- Coding devsecops helps financial enterprises run out of digital acceleration
猜你喜欢
随机推荐
如何将 DevSecOps 引入企业?
lvgl 显示图片示例
超越PaLM!北大碩士提出DiVeRSe,全面刷新NLP推理排行榜
[recruitment position] infrastructure software developer
Want to ask the big guy, is there any synchronization from Tencent cloud Mysql to other places? Binlog saved by Tencent cloud MySQL on cos
"Sequelae" of the withdrawal of community group purchase from the city
Severlet learning foundation
Redis' transaction mechanism
MySQL----函数
P1451 求细胞数量/1329:【例8.2】细胞
Ten billion massage machine blue ocean, difficult to be a giant
数学建模之层次分析法(含MATLAB代码)
JS topic - console log()
Bugku's steganography
华为哈勃化身硬科技IPO收割机
复现Thinkphp 2.x 任意代码执行漏洞
Bugku's eyes are not real
I spring web upload
Common MySQL interview questions
The difference between abstract classes and interfaces in PHP (PHP interview theory question)








