百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

go-debug

> 开发工具
开源

使用 delve 为 atom 编写调试器。

386 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 delve 为 atom 编写调试器。

go-debug

A go debugger for atom using delve.

Install

Either apm install go-debug or search for go-debug in the settings.

Install delve

go-debug tries to install/download delve automatically.

If this fails you can still do it manually by using this guide: https://github.com/derekparker/delve/tree/master/Documentation/installation

Usage

Use F5 to launch the debug window (the one on the right). At selected line press F9 to set (or toggle) break point. other function keys.

Configuration

go-debug has two built-in configurations. Both work on the file/package that is currently open in atom.

  • Debug: compile and debug the current package
  • Test: compile and debug the tests of the current package

It's possible to create additional configurations by creating a file and setting the path in the go-debug setting Configuration File. You can even specify multiple configurations by separating the paths in this setting with commas. Relative paths will be resolved relative to the current project.

Such a configuration file looks like:

javascript
{
  "configurations": [
    { /* a configuration */ },
    { /* another configuration */ },
    // ...
  ]
}

Each configuration supports the following options:

…

All string options can make use of the following variables by using ${...} somewhere inside the string:

…

Note: go-debug also supports the configuration for vscode which are stored in .vscode/launch.json. But be aware that not all configurations might work!

Examples

Always debug the cmd of your program wherever you are right now in your code and add some arguments and environment variables:

javascript
{
  "name": "Debug cmd",
  "mode": "debug",
  "cwd": "${workspaceRoot}/cmd",
  "args": ["--connection=sql"],
  "env": {
    "USER": "ROOT",
    "PW": "SECRET!"
  }
}

Start tests with verbose flag:

javascript
{
  "name": "Verbose Test",
  "mode": "test",
  "args": ["-test.v"]
}

Key bindings

  • f5 starts the current selected configuration
  • shift-f5 restarts the current delve session (r / restart)
  • f6 stops delve (exit / quit / q)
  • f8 continue the execution (c / continue)
  • f9 toggle breakpoint
  • f10 step over to next source line (n / next)
  • f11 step into functions (s / step)
  • shift-f11 step out of functions (stepOut)
  • cmd-k cmd-g (mac) / ctrl-k ctrl-g (others) toggles the main panel

Links

  • Gopher community on slack: Questions? Use the go-plus channel or send me direct messages

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptatomdebugdebuggerdelve

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具