Can't get it to work on macOS 10.15.7 and Docker 3.0.0
Hi,
I can't get it work using the shell script example and not sure how to help debug to contribute and be of help.
All I get is:
[Error - 10:19:00 AM] Starting client failed Launching server using command bin/shell-into-appserver.sh failed.
But there is no detail anywhere so I can't be of more help. I installed Perl-LanguageServer-v2.2.0 on both my local Perl (I use perlbrew) and the Docker container.
Here is my setup:
settings.json
{
"perl": {
"enable": true,
"sshAddr": "dummy",
"sshUser": "dummy",
"sshCmd": "bin/shell-into-appserver.sh",
"sshWorkspaceRoot": "/var/www/app",
"logLevel": 0,
}
}
#!/usr/bin/env bash
COMMAND=$(echo "$@" | sed 's/^.*perl /perl /')
docker-compose exec -u "$UID" -T settle-jam $COMMAND
Here is an update for other people having this issue.
I got it somewhat working by adding the absolute path to "sshCmd" and I also added "perlInc" and "logFile" with a logLevel of 3 and higher and now I can see some of the output in the logfile.
The syntax check seems to work (started working after I adjusted perlInc), but the debugger does nothing. It seems like it's running, there is some output in the logfile but nothing like breakpoints and such seem to work.
I am also trying to resolve this issue. Can you please share your final configuration of settings.json and the docker image that you used? It will be appreciated.
For sure here you go. For some reason it does not work in my env without absolute path in settings.json
I got the syntax checker to work but not the debugger. I can see active logging and started debugging the JSON RPC stuff but haven't had much time to solve the debugger issue:
{
"perl": {
"enable": true,
"sshAddr": "dummy",
"sshUser": "dummy",
"perlInc": [".","./lib","./t"],
"sshCmd": "/Users/alejandroimass/[edited]/[edited]/bin/shell-into-appserver.sh",
//"sshCmd": "./bin/shell-into-appserver.sh",
"sshWorkspaceRoot": "/var/www/app/",
"logFile": "perllang.log",
"logLevel": 0,
},
}
{
"version": "0.2.0",
"configurations": [
{
"type": "perl",
"request": "launch",
"name": "Perl-Debug-Test",
"program": "${workspaceFolder}/src/${relativeFile}",
"stopOnEntry": true,
"reloadModules": true,
},
{
"type": "perl",
"request": "launch",
"name": "Perl-Debug-Server",
"args": ["daemon"],
"program": "${workspaceFolder}/src/${relativeFile} daemon",
"stopOnEntry": true,
"reloadModules": true
}
]
}
#!/usr/bin/env bash
COMMAND=$(echo "$@" | sed 's/^.*perl /perl /')
docker-compose exec -u root -T local $COMMAND
Hi, can you use the debugger now? I also want to resolve this issue. After set setting.json:
{
"perl.enable": true,
"perl.sshAddr": "dummy",
"perl.sshUser": "dummy",
"perl.sshWorkspaceRoot": "/data_local/champollion",
"perl.sshCmd": "/usr/bin/shell-into-appserver.sh",
"perl.logLevel": 0,
}
vscode output got an error : Launching server using command /usr/bin/shell-into-appserver.sh failed.
my shell-into-appserver.sh is
#!/usr/bin/env bash
COMMAND=$(echo "$@" | sed 's/^.*perl /perl /')
docker-compose exec -u '$UID' -T nlp-01160991 $COMMAND
I don't know whether the [SERVICE NAME] is my docker name, is it right? And the absolute path (/usr/bin/shell-into-appserver.sh) is right? Can you help me to resolve this issue? Thanks