redhat-developer / redhat-developer/lsp4ij
Golang DAP: `fmt.Println()`/`fmt.Println("")`/`fmt.Print("\n")` are not displayed in the DAP output
Open
@angelozerr is already working on this.
Since Aug 31, 2026.
bug
- Dominant language
- Java
- Stars
- 344
- Forks
- 113
- Avg merge
- 5h 22m
- Merged PRs (30d)
- 15
Description
Golang DAP: fmt.Println()/fmt.Println("")/fmt.Print("\n") are not displayed in the DAP output
package main
import (
"fmt"
)
func main() {
fmt.Println("a")
fmt.Println() // not displayed in DAP output
fmt.Println("b")
fmt.Println("") // not displayed in DAP output
fmt.Println("c")
fmt.Print("\n") // not displayed in DAP output
fmt.Println("d")
}
Dap run log
dlv dap
Launching 'test.go' with 'Go - Delve'
DAP server listening at: 127.0.0.1:3084
[Trace - 12:52:09] Sending request 'initialize - (1)'.
Params: {
"clientID": "lsp4ij.debug",
"clientName": "IntelliJ IDEA 2026.2.1",
"adapterID": "go",
"linesStartAt1": true,
"columnsStartAt1": true,
"pathFormat": "path",
"supportsVariableType": true,
"supportsVariablePaging": false,
"supportsRunInTerminalRequest": true,
"supportsStartDebuggingRequest": true
}
[Trace - 12:52:09] Received response 'initialize - (1)' in 4ms.
Result: {
"supportsConfigurationDoneRequest": true,
"supportsFunctionBreakpoints": true,
"supportsConditionalBreakpoints": true,
"supportsHitConditionalBreakpoints": true,
"supportsEvaluateForHovers": true,
"exceptionBreakpointFilters": [
{
"filter": "unrecovered-panic",
"label": "Unrecovered Panics",
"default": true
},
{
"filter": "runtime-fatal-throw",
"label": "Fatal Throws",
"default": true
}
],
"supportsSetVariable": true,
"supportsRestartRequest": true,
"supportsExceptionInfoRequest": true,
"supportsDelayedStackTraceLoading": true,
"supportsLogPoints": true,
"supportsReadMemoryRequest": true,
"supportsDisassembleRequest": true,
"supportsClipboardContext": true,
"supportsSteppingGranularity": true,
"supportsInstructionBreakpoints": true
}
[Trace - 12:52:09] Sending request 'launch - (2)'.
Params: {
"name": "Launch Go file",
"request": "launch",
"cwd": "E:/vcsProjects/wiki",
"program": "E:\\vcsProjects\\wiki\\test\\test.go",
"type": "go",
"noDebug": true
}
[Trace - 12:52:09] Received notification 'output'
Params: {
"category": "stdout",
"output": "Building E:\\vcsProjects\\wiki\\test\\test.go"
}
Building E:\vcsProjects\wiki\test\test.go
[Trace - 12:52:10] Received response 'launch - (2)' in 1388ms.
No response returned.
a
b
c
d
[Trace - 12:52:10] Received notification 'output'
Params: {
"category": "console",
"output": "Process 20252 has exited with status 0\n"
}
Process 20252 has exited with status 0
[Trace - 12:52:10] Received notification 'terminated'
Params: {}
[Trace - 12:52:10] Sending request 'disconnect - (3)'.
Params: {}
Disconnected successfully from the debug server.
[Trace - 12:52:10] Received response 'disconnect - (3)' in 1ms.
No response returned.
Process finished with exit code 0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.