Gdlv is a graphical interface to Delve for Linux, Windows and macOS. Previously, I posted Delve debugger in console mode Debugging Go programs with Delve
and now, I would like to introduce the graphical delve debugger.
Implementation
First make sure you have the latest version of delve installed:
go get -u github.com/derekparker/delve/cmd/dlv
then install gdlv:
go get -u github.com/aarzilli/gdlv
To start gdlv can be done by opening command prompt (cmd) then type command
gdlv debug main.go
and it will show GUI of delve debugger as shown as below
You can open other new window by clicking drop down box for example Globals window, Sources window, etc
Now, let us add break-point at line 7 by using command break main.go:7 shown as picture below. You can add break-point too by right click the line code and Set breakpoint.
To clear break-point, can be done by right click and select Clear breakpoint.
By opening new window sources then find your file source code by typing the filename. In my case, the filename is main.go and double click to open the file. You will see the break-point at line 6 and 7.
Type command continue and debugger will stop at line 6
By giving command next, it will go to next break point.
Command in Gdlv is the same command with Dlv.
Thank you
Other topics:
How to build NGINX RTMP module, Setup Live Streaming with NGINX RTMP module, Publishing Stream with Open Broadcaster Software (OBS), Create Adaptive Streaming with NGINX RTMP, Implementing Filtergraph in Streaming with NGINX RTMP, How to Implement Running Text in Streaming with NGINX RTMP, How to build OpenSceneGraph with Code::Blocks, How to build OpenSceneGraph with Visual Studio 2010, Building Geometry Model, How to run OpenSceneGraph with Netbean IDE 8.2 C++, Rendering Basic Shapes, Using OSG Node to Load 3D Object Model, Rendering 3D Simulator with OpenSceneGraph, How to compile wxWidgets with Visual Studio 2010, How to Setup Debugging in Golang with Visual Code, How to Load 3D Object Model with OpenSceneGraph on wxWidgets
No comments:
Post a Comment