WebStorm see TypeScript server logs

Viewed 112

In VSCode I can go into 'OUTPUT' and see logs of all internal tasks that VSCode is running for me, for example a TypeScript server:

enter image description here

I need to see the logs of the TypeScript server in WebStorm because I need to debug weird compilation behavior.

How can I reveal all tasks and servers and their logs WebStorm is running for me?

2 Answers

You can enable debug logging for #com.intellij.lang.javascript.service.JSLanguageServiceQueue:trace in Help | Debug log settings and then inspect the idea.log.* files (Help > Show Log in ...) as well as the .log files created in your project folder while working with your app

The accepted answer does not give the actual tsserver logs AFAICS, but rather a trace of what webstorm send and receive to the server (which is useful in itself).

Turning on logging is done using an environment variable:

$ export TSS_LOG="-level verbose -file /tmp/webstorm-tsserver.log"
$ webstorm

Details: (Webstorm version: 2022.1.3 (linux))

Webstorm overrides TSS_LOG to -level verbose when #com.intellij.lang.javascript.service.JSLanguageServiceQueue:trace is set. In that case the logs are written to $PROJECT_ROOT/.log$PID

Ref: https://youtrack.jetbrains.com/issue/WEB-56446/Not-possible-to-customize-logging-of-the-tsserver-iinstance-webstorm-is-using

Related