I’ve installed:

perl -MCPAN -e 'install Devel::Trace'
and thought I could just put at the top of the file /usr/libexec/webmin/virtual-server/
#!/usr/bin/perl -d:Trace
and then turn on debugging around code that I want traced (so that it shows up in the GUI output during operations that I'm debugging):
$Devel::Trace::TRACE = 1; ... code to be traced ... $Devel::Trace::TRACE = 0;
But, this isn't working. This is the development pattern I use when I want to trace steps in perl normally. What do I need to do to get webmin to recognize it? I did try modifying the shebang of /usr/libexec/webmin/, but that didn't work.

Post edited by: fatbear, at: 2008/11/27 08:40<br><br>Post edited by: fatbear, at: 2008/11/27 08:41

You’ll need to run Perl for the whole process this way, I suspect, as Webmin does some trickery to run in a single Perl process for most actions for performance reasons.

So, I think you’d need to edit the Webmin startup script to start it with this option. Probably /etc/init.d/webmin or /etc/webmin/start…actually, it looks like you could probably edit /usr/libexec/webmin/ to use this shebang line.