Skip to content

No output in VS Code debug console because Width/Height detected as -1 #30

@fxkr

Description

@fxkr
package main

import (
	"github.com/buger/goterm"
)

func main() {
	println("before")
	goterm.Println("foo")
	goterm.Flush()
	println("after", goterm.Width(), goterm.Height())
}

Works if I start the program manually in a regular VS Code terminal (or any terminal really):

image

Doesnt work if I run it via a VS Code launch config, where the output will go into the VS Code debug console. Notice Width/Height is -1, and the text printed by goterm is missing

image

The root cause is that goterm limits its output to the detected Width/Height,

My expectation would be for goterm to handle -1/-1 by disabling row/col limits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions