Go Run & Executing in New Window
Hi all.
New Goland user. I've configured Goland to undertake the typical "go build" and "execute after build" for a new project. This project will be utilizing a command line GUI extensively. I'm attempting to get Goland to work nicely with the hello world example provided here - https://github.com/rivo/tview
Once built, I am able to independently run the compiled binary in the terminal and view the expected output (a "Hello World" box). When attempting to run via the Goland "build and execute" workflow, I only get the following output, but no binary is run within the terminal...
GOROOT=C:\Go #gosetup
GOPATH=C:\Users\Username\go #gosetup
C:\Go\bin\go.exe build -o C:\Users\Username\AppData\Local\Temp\___go_build_main_go.exe C:\Users\Username\go\src\ScannerInterface\main.go #gosetup
C:\Users\Username\AppData\Local\Temp\___go_build_main_go.exe #gosetup
My question is, how can I get the IDE to properly execute the binary in the desired fashion. Examples of acceptable solutions would be;
- Executing the binary in a new pop-out terminal window.
- Modifying the build command to instead be "go run" instead of "go build".
- Any other technique that allows me to view the expected output in a terminal after executing the "go build" shortcut.
Thank you for your thoughts!
请先登录再写评论。
It happens because terminal emulation is not enabled on windows by default. To turn it on run the `Registry` action and enable the `run.processes.with.pty` option. The emulation is not perfect, so it might be better to test the terminal UI in the real terminal.