![]() We can also then continue to execute Perl statements interactively. We can see that $a now has the expected value. The debugger command s is then given which does single step through the loaded code, in this case the loaded code is just a single line and so after that single step the debugging of the provided code is completed. With the debugger command x $a we see that $a is undefined. What just happened? Well, the code $a = 7 was passed to the debugger but not executed. ![]() Use o inhibit_exit to avoid stopping after program termination, The extension talks to over a socket and expects that the debugger will open a new connection to the extension for newly forked children. To give a full sense of what is actually happening though look at the following:ĭebugged program terminated. The only reason to use this as debugger is to enhance your debugging experience when your code uses fork (see 'fork' in perlfunc ). Since we don't really care about if we just want to try out some commands in a repl 0 is usually fine. What happens is that whatever code follows -e is used in the interactive debugging session. After the -e you could specify whatever code you'd like but in most cases, if you are doing this for REPL purposes, you can specify the shortest possible syntactically correct Perl code which is simply a single numeric value. In order to get the debugger into this interactive mode you specify the -d and -e command line options. The debugger commands are pretty well documented if you're interested in using them. Curate this topic Add this topic to your repo To associate your repository with the perl-debugger topic, visit your repos landing page and select 'manage topics. Loading DB routines from version 1.53Įnter h or 'h h' for help, or 'man perldebug' for more help. Add a description, image, and links to the perl-debugger topic page so that developers can more easily learn about it. To start a REPL session execute the following:Īnd you will enter the debugger and be able to execute commands interactively, along with the ability to use debugging functions. While there are several modules available on CPAN which provide a Read Eval Print Loop the classic technique for executing Perl statements interactively is via the perl debugger. Controlling program execution in Perl can be done by telling the debugger to execute up to a certain specified point in the program, called a breakpoint.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |