当前位置:网站首页>一文搞定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了。
常用快捷补全关键字
其余的快捷补全,大家可以自己试一下,输入英文字母看是否有提示即可。
边栏推荐
- 机器学习笔记 - 灰狼优化
- maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
- MySQL之CRUD
- 把 ”中台“ 的思想迁移到代码中去
- I want to inquire about how to ensure data consistency when a MySQL transaction updates multiple tables?
- Ten billion massage machine blue ocean, difficult to be a giant
- 美团优选管理层变动:老将刘薇调岗,前阿里高管加盟
- 复现Thinkphp 2.x 任意代码执行漏洞
- Crud of MySQL
- Thymeleaf uses background custom tool classes to process text
猜你喜欢
随机推荐
我这边同时采集多个oracle表,采集一会以后,会报oracle的oga内存超出,大家有没有遇到的?
复现Thinkphp 2.x 任意代码执行漏洞
No one consults when doing research and does not communicate with students. UNC assistant professor has a two-year history of teaching struggle
P6183 [USACO10MAR] The Rock Game S
【jvm】运算指令
Transfer the idea of "Zhongtai" to the code
keep-alive
Huawei Hubble incarnation hard technology IPO harvester
I want to inquire about how to ensure data consistency when a MySQL transaction updates multiple tables?
episodic和batch的定义
Coding devsecops helps financial enterprises run out of digital acceleration
MySQL----函数
Reconnaissance des caractères easycr
Reasons and solutions for redis cache penetration and cache avalanche
数据库学习——数据库安全性
Common MySQL interview questions
把 ”中台“ 的思想迁移到代码中去
Brief introduction of machine learning framework
Crud of MySQL
Au - delà du PARM! La maîtrise de l'Université de Pékin propose diverse pour actualiser complètement le classement du raisonnement du NLP