Open hoehrmann opened 5 years ago
So a CLI to wrap perl db on remote machine?
A cleaner option that would probably work just as well could be a launch.json
setting like
"pauseCommand": "ssh remote kill -INT -- %pid%",
"terminateCommand": "ssh remote kill -TERM -- %pid%"
Thinking out aloud...
It would be quite nice if the
pause
button would work even when the Perl script runs on a different system than vscode. Pausing means sending aSIGINT
signal to theperl -d
process. There is no way to break into the debugger by sending something over the TCP-backed debuggertty
, but on systems that support e.g.fork
, an evil hack might be possible...Basically, the idea would be that the extension somehow creates a Perl process on the remote system that serves purely as a means to send
SIGINT
to other processes on that remote system. With multisession debugging, creating such a process would be just a matter of sendingfork
to the debugger (probably atstopOnEntry
time) which would automatically connect back to the extension. The new process could then be used as a channel forSIGINT
, while the old process can continue as if nothing happened.Then, when the "old" process should be paused, we could send
CORE::kill('SIGINT', 'old-process-id')
to the forked process, which would cause the "old" process to break into the debugger.That is not really something a debugging extension is supposed to do, but it would address the use case. Perhaps other people have better ideas?