{"id":13895259,"url":"https://github.com/lloiser/go-debug","last_synced_at":"2025-08-11T09:19:08.135Z","repository":{"id":76063529,"uuid":"49749928","full_name":"lloiser/go-debug","owner":"lloiser","description":"🐛 A go debugger for atom using delve.","archived":false,"fork":false,"pushed_at":"2020-05-11T17:18:05.000Z","size":1270,"stargazers_count":386,"open_issues_count":20,"forks_count":21,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-26T07:21:19.634Z","etag":null,"topics":["atom","debug","debugger","delve","go","golang"],"latest_commit_sha":null,"homepage":"https://atom.io/packages/go-debug","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lloiser.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-15T23:07:46.000Z","updated_at":"2025-04-03T11:22:08.000Z","dependencies_parsed_at":"2023-05-04T22:27:31.575Z","dependency_job_id":null,"html_url":"https://github.com/lloiser/go-debug","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/lloiser/go-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloiser%2Fgo-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloiser%2Fgo-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloiser%2Fgo-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloiser%2Fgo-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lloiser","download_url":"https://codeload.github.com/lloiser/go-debug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloiser%2Fgo-debug/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269857926,"owners_count":24486441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","debug","debugger","delve","go","golang"],"created_at":"2024-08-06T18:02:05.815Z","updated_at":"2025-08-11T09:19:08.086Z","avatar_url":"https://github.com/lloiser.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# [go-debug](https://atom.io/packages/go-debug)\n\nA go debugger for atom using [delve](https://github.com/derekparker/delve).\n\n![Demo](https://raw.githubusercontent.com/lloiser/go-debug/master/resources/demo.gif)\n\n## Install\n\nEither `apm install go-debug` or search for `go-debug` in the settings.\n\n### Install delve\n\n`go-debug` tries to install/download delve automatically.\n\nIf this fails you can still do it manually by using this guide: https://github.com/derekparker/delve/tree/master/Documentation/installation\n\n## Usage\nUse F5 to launch the debug window (the one on the right).\nAt selected line press F9 to set (or toggle) break point.\nother [function keys](#key-bindings).\n\n## Configuration\n\n`go-debug` has two built-in configurations. Both work on the file/package that is currently open in atom.\n\n* `Debug`: compile and debug the current package\n* `Test`: compile and debug the tests of the current package\n\nIt'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.\n\nSuch a configuration file looks like:\n\n```js\n{\n  \"configurations\": [\n    { /* a configuration */ },\n    { /* another configuration */ },\n    // ...\n  ]\n}\n```\n\nEach configuration supports the following options:\n\n```js\n{\n  // \"name\" is the display name in the panel (REQUIRED)\n  \"name\": \"...\",\n\n  // \"mode\" determines how to start / connect to delve (REQUIRED)\n  // * debug is used to debug a package\n  // * test debugs the tests of the package\n  // * remote connects to an already running headless delve session on a remote server (see \"host\" and \"port\" below)\n  // * exec debugs a precompiled executable (see \"program\" below)\n  \"mode\": \"debug\" | \"test\" | \"remote\" | \"exec\",\n\n  // used to pass arguments to the executed package / tests (e.g. \"-v\").\n  \"args\": [\"...\"],\n\n  // use this if you have to specify additional environment variables.\n  \"env\": { \"\u003ckey\u003e\": \"\u003cvalue\u003e\" },\n\n  // \"cwd\" specifies the current working directory where delve starts from.\n  // This is useful if you always want to debug/test a specific package (e.g. the \"main\" package) but are currently working on another package\n  \"cwd\": \"\u003cdir\u003e\",\n\n  // \"host\" and \"port\" are used to modify the default port of the locally running delve server.\n  // If \"mode\" is \"remote\" then these define the host and port of the server where a \"headless\" delve is running.\n  \"host\": \"localhost\",\n  \"port\": 2345,\n\n  // \"program\" contains the path to a precompiled executable that should be debugged.\n  // (useful if you have a custom build chain like gb)\n  \"program\": \"\u003cpath\u003e\",\n\n  // pass additional build flags when delve compiles the package/tests.\n  \"buildFlags\": \"\",\n\n  // a path to the \"init\" file that will be executed once delve has started.\n  \"init\": \"\u003cpath\u003e\",\n\n  // turns on/off (default) the \"verbose\" logging for delve (useful if you encounter problems with delve or go-debug).\n  \"showLog\": true | false\n}\n```\n\nAll string options can make use of the following variables by using `${...}` somewhere inside the string:\n\n```js\n{\n  // the working directory on startup of atom\n  cwd: \"...\",\n  // the open file (full path)\n  file: \"...\",\n  // the open file's basename\n  fileBasename: \"...\",\n  // the open file's dirname\n  fileDirname: \"...\",\n  // the open file's extension\n  fileExtname: \"...\",\n  // the open file relative to the \"workspaceRoot\" variable\n  relativeFile: \"...\",\n  // the full path of the project root folder\n  workspaceRoot: \"...\",\n  // this contains all environment variables known to atom including the \"env\" variables from above.\n  // They can be used like so \"${env.GOPATH}/src/...\"\n  env: { \"\u003ckey\u003e\": \"\u003cvalue\u003e\" }\n}\n```\n\n_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!_\n\n### Examples\n\nAlways debug the `cmd` of your program wherever you are right now in your code and add some arguments and environment variables:\n```js\n{\n  \"name\": \"Debug cmd\",\n  \"mode\": \"debug\",\n  \"cwd\": \"${workspaceRoot}/cmd\",\n  \"args\": [\"--connection=sql\"],\n  \"env\": {\n    \"USER\": \"ROOT\",\n    \"PW\": \"SECRET!\"\n  }\n}\n```\n\nStart tests with verbose flag:\n```js\n{\n  \"name\": \"Verbose Test\",\n  \"mode\": \"test\",\n  \"args\": [\"-test.v\"]\n}\n```\n\n## Key bindings\n\n* `f5` starts the current selected configuration\n* `shift-f5` restarts the current delve session (`r / restart`)\n* `f6` stops delve (`exit / quit / q`)\n* `f8` continue the execution (`c / continue`)\n* `f9` toggle breakpoint\n* `f10` step over to next source line (`n / next`)\n* `f11` step into functions (`s / step`)\n* `shift-f11` step out of functions (`stepOut`)\n* `cmd-k cmd-g` (mac) / `ctrl-k ctrl-g` (others) toggles the main panel\n\n## Links\n\n* Gopher community on slack: [![Slack](https://img.shields.io/badge/gophers_slack-%23go--plus-blue.svg?style=flat)](https://gophersinvite.herokuapp.com) \u003cbr /\u003eQuestions? Use the `go-plus` channel or send me direct messages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloiser%2Fgo-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flloiser%2Fgo-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloiser%2Fgo-debug/lists"}