怎样基于vs code建立golang开发环境?

ThoseFlowers · 2015-08-19 17:50:55 · 5088 次点击 · 大约8小时之前 开始浏览    置顶
这是一个创建于 2015-08-19 17:50:55 的主题,其中的信息可能已经有所发展或是发生改变。

vs code目前支持golang的语法高亮什么的,但还不支持编译调试,怎样配置呢?


有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

5088 次点击  
加入收藏 微博
11 回复  |  直到 2015-08-21 13:58:59
yahui9119
yahui9119 · #1 · 10年之前

我的tasks.json的配置是

{
    "version": "0.1.0",

    // The command is tsc. Assumes that tsc has been installed using npm install -g typescript
    "command": "go",

    // The command is a shell script
    "isShellCommand": true,

    // Show the output window only if unrecognized errors occur. 
    "showOutput": "silent",

    // args is the HelloWorld program to compile.
    "args": ["run","${file}"]
}
yahui9119
yahui9119 · #2 · 10年之前

调试的方式 暂时我也没找到。。

ThoseFlowers
ThoseFlowers · #3 · 10年之前
yahui9119yahui9119 #2 回复

调试的方式 暂时我也没找到。。

能编译运行就行了,我本来也不怎么调试

ThoseFlowers
ThoseFlowers · #4 · 10年之前
yahui9119yahui9119 #1 回复

我的**tasks.json**的配置是 ``` { "version": "0.1.0", // The command is tsc. Assumes that tsc has been installed using npm install -g typescript "command": "go", // The command is a shell script "isShellCommand": true, // Show the output window only if unrecognized errors occur. "showOutput": "silent", // args is the HelloWorld program to compile. "args": ["run","${file}"] } ```

对了,task.json放在哪个目录下呢?

wangyanlb
wangyanlb · #5 · 10年之前

是否支持结构体元素的动态提示呢。

ThoseFlowers
ThoseFlowers · #6 · 10年之前
wangyanlbwangyanlb #5 回复

是否支持结构体元素的动态提示呢。

嗯,支持

wangyanlb
wangyanlb · #7 · 10年之前

好像智能下拉支持的不好,按了结构体的名字加“."后,不会出来结构体的元素。要按首字母,又出来一堆非结构体的元素。

ThoseFlowers
ThoseFlowers · #8 · 10年之前
wangyanlbwangyanlb #7 回复

好像智能下拉支持的不好,按了结构体的名字加“."后,不会出来结构体的元素。要按首字母,又出来一堆非结构体的元素。

嗯,没有liteide那样智能

yahui9119
yahui9119 · #9 · 10年之前
ThoseFlowersThoseFlowers #4 回复

#1楼 @yahui9119 对了,task.json放在哪个目录下呢?

·.settings·目录下

yahui9119
yahui9119 · #10 · 10年之前
yahui9119yahui9119 #9 回复

#4楼 @ThoseFlowers ·.settings·目录下

打错字了 是'.settings'

ThoseFlowers
ThoseFlowers · #11 · 10年之前
yahui9119yahui9119 #10 回复

#9楼 @yahui9119 打错字了 是'.settings'

我发现我的code目录下没有这个文件夹

添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传