All Projects β†’ lloiser β†’ Go Debug

lloiser / Go Debug

Licence: mit
πŸ› A go debugger for atom using delve.

Programming Languages

javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Debug

golang-debugger-book
From a debugger's view, Let's explore the computer world! How does compiler, linker and debugger coordinate with each other around the program written in specific programming language? How does a debugger work? If we develop a debugger for go programming language, we must master go type system, runtime... and some Operating System internals. OK,…
Stars: ✭ 49 (-87.44%)
Mutual labels:  debugger, debug
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging πŸ€—
Stars: ✭ 20 (-94.87%)
Mutual labels:  debugger, debug
PBD
πŸ–¨οΈπŸž Printf Based Debugger, a user-friendly C debugger
Stars: ✭ 52 (-86.67%)
Mutual labels:  debugger, debug
RailLink
Compact isolated version of J-Link v9.
Stars: ✭ 69 (-82.31%)
Mutual labels:  debugger, debug
Cocoadebug
iOS Debugging Tool πŸš€
Stars: ✭ 3,769 (+866.41%)
Mutual labels:  debugger, debug
haskell-debug
Implements a graphical haskell debugger in atom, using ghci
Stars: ✭ 21 (-94.62%)
Mutual labels:  atom, debugger
docker-pudb
Debug Python code within a Docker container remotely from your terminal using pudb
Stars: ✭ 18 (-95.38%)
Mutual labels:  debugger, debug
Platformio Atom Ide
PlatformIO IDE for Atom: The next generation integrated development environment for IoT
Stars: ✭ 475 (+21.79%)
Mutual labels:  atom, debugger
simple-debug.css
Debug your layouts with one line of CSS
Stars: ✭ 32 (-91.79%)
Mutual labels:  debugger, debug
PushMeBaby
iOS Push Notification Debug App. You can use this app during iOS Push Notification (development or production) to push notifications on your device from your Mac.
Stars: ✭ 47 (-87.95%)
Mutual labels:  debugger, debug
hilda
LLDB wrapped and empowered by iPython's features
Stars: ✭ 99 (-74.62%)
Mutual labels:  debugger, debug
xr
Lightweight debug server utility for PHP.
Stars: ✭ 116 (-70.26%)
Mutual labels:  debugger, debug
GoDebug
Go debugger (Delve) integration with Sublime Text 3
Stars: ✭ 20 (-94.87%)
Mutual labels:  debugger, debug
react-native-debug-console
A network and console debug component and modal for react native purely in JavaScript
Stars: ✭ 17 (-95.64%)
Mutual labels:  debugger, debug
gdbundle
Minimalist plugin manager for GDB and LLDB
Stars: ✭ 72 (-81.54%)
Mutual labels:  debugger, debug
SmartDump
SmartDump - an exception and memory dump capture utility
Stars: ✭ 17 (-95.64%)
Mutual labels:  debugger, debug
Logcat
Android ζ—₯εΏ—ζ‰“ε°ζ‘†ζžΆοΌŒεœ¨ζ‰‹ζœΊδΈŠε―δ»₯η›΄ζŽ₯ηœ‹εˆ° Logcat ζ—₯志啦
Stars: ✭ 189 (-51.54%)
Mutual labels:  debugger, debug
Pysnooper
Never use print for debugging again
Stars: ✭ 14,815 (+3698.72%)
Mutual labels:  debugger, debug
error
Makes handling and debugging PHP errors suck less
Stars: ✭ 17 (-95.64%)
Mutual labels:  debugger, debug
debug.js
Debugger of JavaScript, by JavaScript, for JavaScript
Stars: ✭ 19 (-95.13%)
Mutual labels:  debugger, debug

go-debug

A go debugger for atom using delve.

Demo

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:

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

Each configuration supports the following options:

{
  // "name" is the display name in the panel (REQUIRED)
  "name": "...",

  // "mode" determines how to start / connect to delve (REQUIRED)
  // * debug is used to debug a package
  // * test debugs the tests of the package
  // * remote connects to an already running headless delve session on a remote server (see "host" and "port" below)
  // * exec debugs a precompiled executable (see "program" below)
  "mode": "debug" | "test" | "remote" | "exec",

  // used to pass arguments to the executed package / tests (e.g. "-v").
  "args": ["..."],

  // use this if you have to specify additional environment variables.
  "env": { "<key>": "<value>" },

  // "cwd" specifies the current working directory where delve starts from.
  // 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
  "cwd": "<dir>",

  // "host" and "port" are used to modify the default port of the locally running delve server.
  // If "mode" is "remote" then these define the host and port of the server where a "headless" delve is running.
  "host": "localhost",
  "port": 2345,

  // "program" contains the path to a precompiled executable that should be debugged.
  // (useful if you have a custom build chain like gb)
  "program": "<path>",

  // pass additional build flags when delve compiles the package/tests.
  "buildFlags": "",

  // a path to the "init" file that will be executed once delve has started.
  "init": "<path>",

  // turns on/off (default) the "verbose" logging for delve (useful if you encounter problems with delve or go-debug).
  "showLog": true | false
}

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

{
  // the working directory on startup of atom
  cwd: "...",
  // the open file (full path)
  file: "...",
  // the open file's basename
  fileBasename: "...",
  // the open file's dirname
  fileDirname: "...",
  // the open file's extension
  fileExtname: "...",
  // the open file relative to the "workspaceRoot" variable
  relativeFile: "...",
  // the full path of the project root folder
  workspaceRoot: "...",
  // this contains all environment variables known to atom including the "env" variables from above.
  // They can be used like so "${env.GOPATH}/src/..."
  env: { "<key>": "<value>" }
}

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:

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

Start tests with verbose flag:

{
  "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: Slack
    Questions? Use the go-plus channel or send me direct messages
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].