How to debug Proxmox Perl code

EuroDomenii

Well-Known Member
Sep 30, 2016
144
30
48
Slatina
www.domenii.eu
Since I am coming from php world ( Xdebug remote with ssh tunneling via PhpStorm), it would be best to ask via example.

I want to debug btrfs snapshot rollback feature.

-Setup a breakpoint in function volume_snapshot_rollback from PVE/Storage/BTRFSPlugin.pm
https://www.mail-archive.com/pve-devel@pve.proxmox.com/msg18777.html

-Click in Proxmox GUI the RollBack button

-Step in into the function volume_snapshot_rollback ( on remote debug client), run it step by step, watching the values and so on.

Thanks!
 
Last edited:
well, you can just edit the code? whatever you print in the perl code is usually printed to stdout as well, when run from the command line (e.g., "qm rollback VMID SNAPSHOT"). Data::Dumper is a handy tool for dumping bigger data structures for printing. I don't think you will need more, but if you really want to set breakpoints, you can also use perl's "-d" flag and call the CLI tools with that?
 
  • Like
Reactions: EuroDomenii

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!