当前位置:网站首页>一文搞定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了。
常用快捷补全关键字
其余的快捷补全,大家可以自己试一下,输入英文字母看是否有提示即可。
边栏推荐
- ICML 2022 | explore the best architecture and training method of language model
- Can I pass the PMP Exam in 20 days?
- Leetcode: Shortest Word Distance II
- I spring and autumn blasting-2
- MySQL表字段调整
- Ctfshow web entry explosion
- Creation and optimization of MySQL index
- JS knowledge points-01
- JMeter performance test: serveragent resource monitoring
- How to paste the contents copied by the computer into mobaxterm? How to copy and paste
猜你喜欢
随机推荐
I collect multiple Oracle tables at the same time. After collecting for a while, I will report that Oracle's OGA memory is exceeded. Have you encountered it?
Creation and use of thymeleaf template
I want to inquire about how to ensure data consistency when a MySQL transaction updates multiple tables?
Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel
Reproduce ThinkPHP 2 X Arbitrary Code Execution Vulnerability
sql server char nchar varchar和nvarchar的区别
Go learning ----- relevant knowledge of JWT
复现Thinkphp 2.x 任意代码执行漏洞
Ctfshow web entry information collection
ionic cordova项目修改插件
机器学习框架简述
How can the boss choose programmers to help me with development?
Reasons and solutions for redis cache penetration and cache avalanche
Crud of MySQL
Common redis data types and application scenarios
swiper. JS to achieve barrage effect
ICML 2022 | explore the best architecture and training method of language model
Where is the operation of convertible bond renewal? Is it safer and more reliable to open an account
Select sort and bubble sort
Fr exercise topic - simple question