-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong text output at DEBUG CONSOLE #2131
Comments
Hi, is the only difference those invalid characters indicated with the arrow? This is most likely an encoding issue in the debug console, and therefore not really related to VS Code Go. However, if you can try the following we can perhaps narrow it down:
|
@findleyr test.txt is attached, can you reproduce? |
With shorter text file, I don’t reproduce. In the example: the only difference are those invalid characters indicated with the arrow. |
@kzhui125 this issue tracker is maintained by a small number of engineers working on primarily on Go, and this problem does not yet appear directly related to Go or the Go extension. We don't have unlimited resources to investigate every problem and so try to first isolated whether the problem is related to the extension. Thanks for trying with a shorter text file. Can you produce a minimal text file that reproduces the problem? What about the other steps: are the characters formatted correctly in the integrated terminal, or if you open the file as a VS Code tab? |
Hi, could you try setting "console": "integratedTerminal" in your launch config? More details here: |
@findleyr this problem is only related to debug console |
I have provided you the code and test.txt file. You can reproduce by yourself too. |
I don’t know this bug is related to vscode or vscode-go extension, can you confirm? |
@kzhui125 we discussed in our triage today. This is a problem in the vscode-go extension, where it truncates based on byte offsets rather than character offsets (and therefore corrupts some characters). I think since there is a viable workaround, and this only impacts large output, we are unlikely to prioritize this anytime soon. |
Thanks, but I often debug testing file functions instead of main.go, how can I use integrated terminal in this way |
Create a test configuration and start debug test with F5. |
Bro, i have a litle problem with my code, iam a JavaScript and React developer, and i dont wanna write a simple code of "if and else if" because my debug console have a show a litle bit problema when he says: |
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.go: /usr/local/bin/go: go version go1.17.6 darwin/amd64
go-outline: /Users/zm/go/bin/go-outline (version: v0.0.0-20210608161538-9736a4bde949 built with go: go1.17.6)
gotests: /Users/zm/go/bin/gotests (version: v1.6.0 built with go: go1.17.6)
gomodifytags: /Users/zm/go/bin/gomodifytags (version: v1.16.0 built with go: go1.17.6)
impl: /Users/zm/go/bin/impl (version: v1.1.0 built with go: go1.17.6)
goplay: /Users/zm/go/bin/goplay (version: v1.0.0 built with go: go1.17.6)
dlv: /Users/zm/go/bin/dlv (version: v1.8.1 built with go: go1.17.6)
staticcheck: /Users/zm/go/bin/staticcheck (version: v0.2.2 built with go: go1.17.6)
gopls: /Users/zm/go/bin/gopls (version: v0.8.1 built with go: go1.17.6)
Share the Go related settings you have added/edited
Describe the bug
bug: the output in DEBUG CONSOLE is not the same as the content of
test.txt
expected: the output should be the content of
test.txt
Steps to reproduce the behavior:
fmt.Println("end")
Screenshots or recordings
the test.txt is attacted:
test.txt
The text was updated successfully, but these errors were encountered: