richterger / Perl-LanguageServer

Language Server for Perl
Other
224 stars 51 forks source link

Support for fork / parallel sessions in debugger #102

Open hoehrmann opened 3 years ago

hoehrmann commented 3 years ago

Some years ago I added support for multiple parallel debug sessions to vscode-perl-debug (now defunct) including support for fork where the individual processes properly showed up in the corresponding debugger window. https://github.com/pullhub/vscode-perl-debug/tree/variables#handling-multiple-processes has some documentation, and I would expect the feature branch there to still work, but I haven't done anything with it in a long time. I also wrote https://metacpan.org/pod/Devel::vscode as an option for debuggees to override fork so the debugger has a chance to pick up right after the fork.

It seems Perl-LanguageServer largely lacks support for anything like this, I gave it a quick try with https://github.com/pullhub/vscode-perl-debug/blob/variables/src/tests/data/fork.pl but stepping through that with F10 ends up breaking (nothing happens anymore when pressing F10), and I did not see any process list showing the callstack for each process, or anything like that. What should I expect here, and if there is currently support for multiple parallel debug sessions, could that be added?

gadgetjunkie commented 3 years ago

This would be extremely useful for me and my team. We use the Mojolicious Web server framework, and all our code is running in a forked process, making it impossible to debug with Perl::Language server as it exists today.

richterger commented 3 years ago

Also this would be very usefull, I personally don't need it and don't have time to implement it right now. Any contributions are welcome.