jhzn / delver

go test command line interface for dlv(delve)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What does it do?

Delver makes the command line interface for starting dlv the same as the one used in go test

Example

Say you're using this when developing/testing:

go test -v -count=1 -run '^TestMyFunc$' ./pkg/api/tests

And want to switch to debugging it with dlv. You can't just swap the program and have it work.

-go test -v -count=1 -run '^TestMyFunc$' ./pkg/api/tests
+dlv test -v -count=1 -run '^TestMyFunc$' ./pkg/api/tests

Delver fixes this. Now you can do:

delver test -v -count=1 -run '^TestMyFunc$' ./pkg/api/tests

You'll get dropped into dlv like so:

delver is running cmd:
[dlv test --build-flags./pkg/api/tests -- -test.v -test.count=1 -test.run '^TestMyFunc$' ./pkg/api/tests]

Type 'help' for list of commands.
(dlv)

Instructions

Install

go install github.com/jhzn/delver@latest

Develop

git clone https://github.com/jhzn/delver
go build -o delver ./...

Note

This is very early software and not rigorously tested.

If you find any issue PR:s are very welcome :)

About

go test command line interface for dlv(delve)

License:MIT License


Languages

Language:Go 100.0%