当前位置:网站首页>一文搞定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了。
常用快捷补全关键字




其余的快捷补全,大家可以自己试一下,输入英文字母看是否有提示即可。
边栏推荐
- 复现Thinkphp 2.x 任意代码执行漏洞
- MySQL5.7的JSON基本操作
- Coding devsecops helps financial enterprises run out of digital acceleration
- [12 classic written questions of array and advanced pointer] these questions meet all your illusions about array and pointer, come on!
- Redis distributed lock principle and its implementation with PHP (2)
- Severlet learning foundation
- 爱可可AI前沿推介(7.5)
- Bugku alert
- Ionic Cordova project modification plug-in
- Crud de MySQL
猜你喜欢
随机推荐
机器学习笔记 - 灰狼优化
Where is the operation of convertible bond renewal? Is it safer and more reliable to open an account
Ctfshow web entry command execution
Dark horse programmer - software testing -10 stage 2-linux and database -44-57 why learn database, description of database classification relational database, description of Navicat operation data, de
What are the domestic formal futures company platforms in 2022? How about founder metaphase? Is it safe and reliable?
Database learning - Database Security
I spring web upload
MySQL----函数
机器学习框架简述
想问下大家伙,有无是从腾讯云MYSQL同步到其他地方的呀?腾讯云MySQL存到COS上的binlog
Redis distributed lock principle and its implementation with PHP (1)
DVWA range clearance tutorial
Fr exercise topic --- comprehensive question
1330:【例8.3】最少步数
Reconnaissance des caractères easycr
JMeter performance test: serveragent resource monitoring
ICML 2022 | 探索语言模型的最佳架构和训练方法
Easyocr character recognition
Usage and usage instructions of JDBC connection pool
lv_font_conv离线转换









