pjcj / Devel--Cover

Code coverage metrics for Perl
http://www.pjcj.net/perl.html
93 stars 87 forks source link

How do I get debug output from Cover.xs? #333

Closed jtk18 closed 5 months ago

jtk18 commented 5 months ago

Hello! I've been trying to get debug output working for Cover.xs in a local clone of this repository. Here's my steps:

  1. clone this repo
  2. run the Makefile.PL
  3. make my changes to Cover.xs
  4. make
  5. then in the repo I'm testing against I run DEVEL_COVER_DEBUG=1 perl -I/root/repos/Devel--Cover/lib -MDevel::Cover Simple.t

It outputs debug info from Devel::Cover's perl modules, but not the XS module. How do I get that output? Thank you!

jtk18 commented 5 months ago

Ah, the documentation says that DEVEL_COVER_DEBUG only works for the test suite. I guess I was confused because I was getting some output. I suppose it should say, DEVEL_COVER_DEBUG only works for Cover.xs debug statements inside the repository.

Thanks, I guess that solves my issue!

jtk18 commented 5 months ago

For anyone wondering how to do this in the future.. here's how it got it to work:

/usr/bin/perl "-Ifixtures/lib" \
        "-I/root/repos/Devel--Cover/blib/arch" \
        "-I/root/repos/Devel--Cover/blib/lib" \
       "-I/usr/lib64/perl5" "-I/usr/share/perl5" \
       "-MExtUtils::Command::MM" "-MDevel::Cover" \
       fixtures/t/Simple.t