GoLand 2024.3 Help

Customize views

During a debugging session, GoLand shows you information about your variables, types, threads, frames, and more. However, you may want to focus on specific runtime details and have the data filtered or rendered in a specific format. In this scenario, GoLand lets you customize the how the debugger's output appears Debug tool window and the editor.

Customize data view

GoLand allows you to configure which information about the variables you want to get.

Unless explicitly specified, these preferences apply to all the places where the variable values are displayed (the Variables tab, inline values view, tooltips, and so on).

Show/hide object types

You can select whether to display the type of the object for the corresponding reference-type variables.

  • Right-click anywhere in the Variables tab and turn Show types on or off.

Configure display of specific types

You can fine-tune how particular types are displayed.

  • Press Ctrl+Alt+S to open settings and then select Build, Execution, Deployment | Debugger | Data Views | Go.

Item

Description

Default integer format

Set the default numbering system for integers: HEX (Hexadecimal), DEC (Decimal), BIN (Binary).

Show types

Display types of variables. For more information, refer to Show/hide object types.

Show pointer addresses

Display pointer addresses.

Enable String() view

Renders a value in the debugger.

The debugger's value rendering algorithm follows these steps:

  1. If the value belongs to predefined types, it is rendered using a custom renderer for types such as time.Duration, time.Time, net.IP, net.IPMask, net.IPNet, and net/http.Request.

  2. If debugString(), DebugString(), String(), or Error() methods are present and these methods are simple calls to the fmt.Sprintf() function, values are formatted without calling the actual String() function.

  3. If the formatting in the previous step is unsuccessful, the debugger will call the String() function for formatting.

  4. If all previous attempts fail, the debugger will display the value without any formatting, based on the information returned by Delve.

For more information about current limitations, refer to the Delve documentation on the call command.

Last modified: 13 November 2024