-
Notifications
You must be signed in to change notification settings - Fork 54
Delve Debugger
This plugin implements basic keystrokes for easing the debugging process of Go applications. The aim of this plugin is providing a flexible approach for debugging your applications.
You will need to get Delve installed.
Check out:
https://github.com/go-delve/delve
For installing it in your system.
Open the files you wanna debug then switch to GOLANG mode by pressing:
<Key-numbersign>
That key is the one corresponding to '#' char.
Switch to the main package file then start the debugging process by pressing:
<Key-1>
In GOLANG mode. You will get a status bar message informing the debugger was started. You can check out the debugger output by pressing:
<Alt-q>
In GLOBAL mode. It means whatever the mode you're then that key will work. That will hold data on a text window, such a data would be coming from the debugger process.
Whenever you set a breakpoint, remove a breakpoint or send a command then the debugger will write its output to syslog window thus you can go keeping track of what is going.
Sometimes you may need to drop arguments to the application, just press:
<Key-2>
In GOLANG mode, it will pop an input widget for you entering the program arguments.
Just press:
<Key-m>
In GOLANG mode.
Place the cursor at the line you want the debugger to stop on then press:
<Key-b>
Check whether the breakpoint was set by pressing:
<Alt-q>
Place the cursor over the line you want to remove the breakpoint then press:
<Control-c>
In GLOBAL mode.
In order to stop at the next breakpoint, press:
<Key-c>
in GOLANG mode. It sends a '(c)ontinue' to the debugger process.
Select the expression you want to evaluate then press:
<Key-p>
In GLOBAL MODE. Once you have sentthe selected text then check the output by issuing:
<Alt-q>
When the debugger steps on a given breakpoint/line it may be good to evaluate some expressions to check what is going on. For such just press:
<Key-x>
Then enter your expression and hit return. You will be able to check the expression result by opening syslog window.
Just hit:
<Key-r>
Just hit:
<Key-Q>