intellij-v icon indicating copy to clipboard operation
intellij-v copied to clipboard

The console cannot display eprintln() content, but the terminal can display it normally

Open tzSharing opened this issue 1 year ago • 4 comments

Describe the bug

fn main(){
	println('111')
	eprintln('222')
	println('333')
}

Expected Behavior

Normal display

Current Behavior

run console:

run console

cmd terminal:

cmd console

Environment details (v doctor output)

V full version: V 0.4.7 fd7986c.8af19ec
OS: windows, Microsoft Windows 10 רҵ v19045 64 λ
Processor: 4 cpus, 64bit, little endian,

getwd: C:\Users\TZ
vexe: D:\v\v.exe
vexe mtime: 2024-07-27 17:14:26

vroot: OK, value: D:\v
VMODULES: OK, value: C:\Users\TZ\.vmodules
VTMP: OK, value: C:\Users\TZ\AppData\Local\Temp\v_0

Git version: git version 2.45.1.windows.1
Git vroot status: 0.4.7-5-g8af19ece (13 commit(s) behind V master)
.git/config present: true

CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.

thirdparty/tcc status: thirdparty-windows-amd64 b425ac82

IDE Type (IDEA Community/Ultimate, GoLand, CLion, etc.)

IntelliJ IDEA 2024.1.4 (Community Edition)
Build #IC-241.18034.62, built on June 21, 2024
Runtime version: 17.0.11+1-b1207.24 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
Kotlin 插件: K2 Kotlin 模式(Alpha)
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.intellij.zh (241.271)
  io.vlang (0.0.1-beta.5)
Kotlin: 241.18034.62-IJ

Plugin Version

0.0.1-beta.5

tzSharing avatar Jul 29 '24 09:07 tzSharing

I noticed few different behaviours regarding terminal. Sometimes error is not printed at all, sometimes error is printed before anything else and sometimes (very rarely) printed as it should.

I think it is related to asynchronous behavior of command line handler in vlang, but I do not have a clue yet how to fix it.

Krotki avatar Aug 27 '24 16:08 Krotki

simple C.fprintf(C.stderr, c'test') didn't work also

but, after disabling "emulate terminal" option in run configuration, output is expected but eprintln/panic in err handler still not working

crackedmind avatar Sep 08 '24 03:09 crackedmind

simple C.fprintf(C.stderr, c'test') didn't work also

but, after disabling "emulate terminal" option in run configuration, output is expected but eprintln/panic in err handler still not working

Is there a setting to globally disable it automatically for each run configuration?

ddkwork avatar Jun 11 '25 15:06 ddkwork

Is there a setting to globally disable it automatically for each run configuration?

No. It is a default setting.

Krotki avatar Jun 22 '25 14:06 Krotki