Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Go tests debugging

Is there a way to debug tests in Go using an IDE like IntelliJ ? I am using the Go plugin for intelliJ and seems like when providing a debug configuration, the debug button is disabled.

like image 647
psbits Avatar asked Jan 20 '16 00:01

psbits


People also ask

How do I run a go test in debug mode?

Create a breakpoint by clicking the gutter on the necessary line. Alternatively, click the line where you want to create a breakpoint and press Ctrl+F8 . Click Run | Debug.

Does go have a debugger?

It allows you to build, edit, and debug programs. If you use VS Code to run your Go code and have the official Go extension installed on the editor, you can debug your code by pressing F5 or Run and Debug on your computer.

How do I debug a go file?

Restart Ctrl+Shift+F5 Whenever you wish to restart debugging a program that has hit a breakpoint, you can use the restart command to start debugging the program from the beginning instead of killing and relaunching the debugger.

Does go test run in parallel?

The 'go test' command may run tests for different packages in parallel as well, according to the setting of the -p flag (see 'go help build').


1 Answers

It is possible in Gogland: 1.0 Preview, Build EAP 12, 172.3757.46.

This version has an expiration date: November 9, 2017, but there are already newer versions released and they probably have later expiration dates.

like image 80
Ewa Avatar answered Oct 14 '22 01:10

Ewa