Camelcade / Devel-Camelcadedb

Perl module for debugging with Perl5 plugin for IntelliJ
Other
23 stars 9 forks source link

Restore runtime special variables before exit #53

Closed jonas-lindmark closed 3 years ago

jonas-lindmark commented 3 years ago

When using the debugger with mod_perl2 (Apache httpd) and disconnecting the debug session we often end up in _get_next_command calling "exit -1". This should be fine because mod_perl2 handles this and just terminates the current request.

The problem is that then the environment variables are not restored and the application starts to behave very strange after that.

hurricup commented 3 years ago

Thanks for pointing this out. I've improved your solution a bit to avoid invalid state restoration.