gitlab.com/Raven-IO/raven-delve@v1.22.4/Documentation/usage/dlv_test.md (about) 1 ## dlv test 2 3 Compile test binary and begin debugging program. 4 5 ### Synopsis 6 7 Compiles a test binary with optimizations disabled and begins a new debug session. 8 9 The test command allows you to begin a new debug session in the context of your 10 unit tests. By default Delve will debug the tests in the current directory. 11 Alternatively you can specify a package name, and Delve will debug the tests in 12 that package instead. Double-dashes `--` can be used to pass arguments to the test program: 13 14 dlv test [package] -- -test.run TestSomething -test.v -other-argument 15 16 See also: 'go help testflag'. 17 18 ``` 19 dlv test [package] [flags] 20 ``` 21 22 ### Options 23 24 ``` 25 -h, --help help for test 26 --output string Output path for the binary. 27 ``` 28 29 ### Options inherited from parent commands 30 31 ``` 32 --accept-multiclient Allows a headless server to accept multiple client connections via JSON-RPC or DAP. 33 --allow-non-terminal-interactive Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr 34 --api-version int Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1) 35 --backend string Backend selection (see 'dlv help backend'). (default "default") 36 --build-flags string Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v" 37 --check-go-version Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true) 38 --disable-aslr Disables address space randomization 39 --headless Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections. 40 --init string Init file, executed by the terminal client. 41 -l, --listen string Debugging server listen address. Prefix with 'unix:' to use a unix domain socket. (default "127.0.0.1:0") 42 --log Enable debugging server logging. 43 --log-dest string Writes logs to the specified file or file descriptor (see 'dlv help log'). 44 --log-output string Comma separated list of components that should produce debug output (see 'dlv help log') 45 --only-same-user Only connections from the same user that started this instance of Delve are allowed to connect. (default true) 46 -r, --redirect stringArray Specifies redirect rules for target process (see 'dlv help redirect') 47 --wd string Working directory for running the program. 48 ``` 49 50 ### SEE ALSO 51 52 * [dlv](dlv.md) - Delve is a debugger for the Go programming language. 53