redhat-developer / rsp-server

A server management protocol based on LSP4J
30 stars 29 forks source link

Tomcat Server Debug Doesn't Load "mapProperty.launch.env" #698

Closed imaperson closed 1 year ago

imaperson commented 1 year ago

Setting environment variables via "mapProperty.launch.env" in the server configuration seems to work when running a tomcat server but not when debugging a tomcat server. Environment variables set in "mapProperty.launch.env" seem to be null when debugging.

I have test example located here https://github.com/imaperson/serverdebugtest using a devcontainer with a tomcat based docker image. The README should have instructions on how to replicate.

Apologies if I perhaps am not setting up the configuration correctly. I could have sworn this worked for me last week. Perhaps something changed in the update to the extension today.

robstryker commented 1 year ago

Replicated when using following workflow: 1) use vscode to launch tomcat in run mode 2) on linux, use following command

ps ax | grep java | grep tomcat | awk '{$1=$1};1' | cut -f 1 -d " " | awk '{ print "cat /proc/" $0 "/environ | grep --text SUCCESS";}' | sh

3) Verify output exists 4) stop server, start in debug mode 5) use same command on CLI 6) expect output, receive no output