in reply to Re: how do I debug a module w/ c
in thread how do I debug a module w/ c

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: how do I debug a module w/ c
by chromatic (Archbishop) on Aug 27, 2008 at 06:14 UTC

    Build your XS binary (a DLL on Windows, I suppose) with debugging symbols, launch perl.exe in your debugger, and set breakpoints in your DLL.

      What is the XS binary (a DLL on Windows)? How do I do that? And then how do I launch Perl.exe in the debugger?
        What is the XS binary (a DLL on Windows)?

        It's the compiled version of the C code which apparently you need to debug.

        How do I do that? And then how do I launch Perl.exe in the debugger?

        I don't know. I don't develop on Windows. I don't use Visual Studio either.

        On almost any Unix, I'd change the Makefile to include the -g flag, which adds debugging symbols and rebuild the XS file. Then I'd run gdb perl to start Perl in the debugger. There are similar procedures for Windows and VS, but you'll have to find someone who's used them.