{
    "content": [
        {
            "type": "text",
            "text": "# DEBUG (perldoc)\n\n## Sections\n\n- **Found in /usr/share/perl/5.34/pod/perlfaq3.pod**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DEBUG",
        "section": "-q",
        "mode": "perldoc",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Found in /usr/share/perl/5.34/pod/perlfaq3.pod",
                "lines": 36,
                "subsections": []
            }
        ],
        "sections": {
            "Found in /usr/share/perl/5.34/pod/perlfaq3.pod": {
                "content": "How do I debug my Perl programs?\n(contributed by brian d foy)\n\nBefore you do anything else, you can help yourself by ensuring that you\nlet Perl tell you about problem areas in your code. By turning on\nwarnings and strictures, you can head off many problems before they get\ntoo big. You can find out more about these in strict and warnings.\n\n#!/usr/bin/perl\nuse strict;\nuse warnings;\n\nBeyond that, the simplest debugger is the \"print\" function. Use it to\nlook at values as you run your program:\n\nprint STDERR \"The value is [$value]\\n\";\n\nThe Data::Dumper module can pretty-print Perl data structures:\n\nuse Data::Dumper qw( Dumper );\nprint STDERR \"The hash is \" . Dumper( \\%hash ) . \"\\n\";\n\nPerl comes with an interactive debugger, which you can start with the\n\"-d\" switch. It's fully explained in perldebug.\n\nIf you'd like a graphical user interface and you have Tk, you can use\n\"ptkdb\". It's on CPAN and available for free.\n\nIf you need something much more sophisticated and controllable, Leon\nBrocard's Devel::ebug (which you can call with the \"-D\" switch as\n\"-Debug\") gives you the programmatic hooks into everything you need to\nwrite your own (without too much pain and suffering).\n\nYou can also use a commercial debugger such as Affrus (Mac OS X), Komodo\nfrom Activestate (Windows and Mac OS X), or EPIC (most platforms).\n",
                "subsections": []
            }
        }
    }
}