The Go Test Explorer supports running and debugging tests and benchmarks as well
as profiling the CPU and memory usage of benchmarks. Profiling is provided by Go
and visualization by the Go PProf tool.
The command dot is required to use the profiling features, as go tool pprof uses dot
to generate the diagrams that are displayed. See
Graphviz.org for installation instructions.
always - include files in the test hierarchy (default)
never - list tests as direct children of packages
Enable cpu profile and memory profile code lenses (defaults to true)
Update test status when debugging (running, failed, passed)
Unless VSCode provides some way of capturing output from a debug session,
this would require some significant modifications
You'll need a VSCode development environment, and Go.
Clone the repository: git clone https://gitlab.com/firelizzard/vscode-go-test-adapter
Run npm install to install dependencies.
Open the directory in VS Code.
Run npm run watch or start the watch Task in VS Code to get the TypeScript compiler running.
Go to the Debug section in the sidebar and run "Go Test Adapter". This will
start a separate VS Code instance for testing the extension in. It gets
updated code whenever "Reload Window" is run in the Command Palette.
In the new VSCode window, titled [Extension Development Host], open a Go folder with tests.
For more information and reference, review the example
adapter as well as
adapters for other languages.