perl5db.html

来自「perl教程」· HTML 代码 · 共 1,157 行 · 第 1/5 页

HTML
1,157 行
字号
			<li><a href="#cmd_o__options__command_"><code>cmd_o</code> - options (command)</a></li>
			<li><a href="#cmd_o__nonexistent_in_5_8_x__command_"><code>cmd_O</code> - nonexistent in 5.8.x (command)</a></li>
			<li><a href="#cmd_v__view_window__command_"><code>cmd_v</code> - view window (command)</a></li>
			<li><a href="#cmd_w__add_a_watch_expression__command_"><code>cmd_w</code> - add a watch expression (command)</a></li>
			<li><a href="#cmd_w__delete_watch_expressions__command_"><code>cmd_W</code> - delete watch expressions (command)</a></li>
		</ul>

	</ul>

	<li><a href="#support_routines">SUPPORT ROUTINES</a></li>
	<ul>

		<li><a href="#save">save</a></li>
		<li><a href="#print_lineinfo__show_where_we_are_now"><code>print_lineinfo</code> - show where we are now</a></li>
		<li><a href="#postponed_sub"><code>postponed_sub</code></a></li>
		<li><a href="#postponed"><code>postponed</code></a></li>
		<li><a href="#dumpit"><code>dumpit</code></a></li>
		<li><a href="#print_trace"><code>print_trace</code></a></li>
		<li><a href="#dump_trace_skip__count__"><code>dump_trace(skip[,count])</code></a></li>
		<li><a href="#action__"><code>action()</code></a></li>
		<li><a href="#unbalanced">unbalanced</a></li>
		<li><a href="#gets__"><code>gets()</code></a></li>
		<li><a href="#db__system____handle_calls_to_system____without_messing_up_the_debugger"><a href="../lib/Pod/perlfunc.html#item_system"><code>DB::system()</code></a> - handle calls to&lt;system()&gt; without messing up the debugger</a></li>
	</ul>

	<li><a href="#tty_management">TTY MANAGEMENT</a></li>
	<ul>

		<li><a href="#setterm">setterm</a></li>
	</ul>

	<li><a href="#get_fork_tty_example_functions">GET_FORK_TTY EXAMPLE FUNCTIONS</a></li>
	<ul>

		<ul>

			<li><a href="#xterm_get_fork_tty"><code>xterm_get_fork_TTY</code></a></li>
			<li><a href="#os2_get_fork_tty"><code>os2_get_fork_TTY</code></a></li>
		</ul>

		<li><a href="#create_in_out__flags_"><code>create_IN_OUT($flags)</code></a></li>
		<li><a href="#resetterm"><code>resetterm</code></a></li>
		<li><a href="#readline"><a href="../lib/Pod/perlfunc.html#item_readline"><code>readline</code></a></a></li>
	</ul>

	<li><a href="#options_support_routines">OPTIONS SUPPORT ROUTINES</a></li>
	<ul>

		<li><a href="#dump_option__list_the_current_value_of_an_option_setting"><code>dump_option</code> - list the current value of an option setting</a></li>
		<li><a href="#option_val__find_the_current_value_of_an_option"><code>option_val</code> - find the current value of an option</a></li>
		<li><a href="#parse_options"><code>parse_options</code></a></li>
	</ul>

	<li><a href="#restart_support">RESTART SUPPORT</a></li>
	<ul>

		<li><a href="#set_list">set_list</a></li>
		<li><a href="#get_list">get_list</a></li>
	</ul>

	<li><a href="#miscellaneous_signal_and_i_o_management">MISCELLANEOUS SIGNAL AND I/O MANAGEMENT</a></li>
	<ul>

		<li><a href="#catch__"><code>catch()</code></a></li>
		<li><a href="#warn__"><a href="../lib/Pod/perlfunc.html#item_warn"><code>warn()</code></a></a></li>
	</ul>

	<li><a href="#initialization_tty_support">INITIALIZATION TTY SUPPORT</a></li>
	<ul>

		<li><a href="#reset_in_out"><code>reset_IN_OUT</code></a></li>
	</ul>

	<li><a href="#option_support_routines">OPTION SUPPORT ROUTINES</a></li>
	<ul>

		<li><a href="#tty"><code>TTY</code></a></li>
		<li><a href="#notty"><code>noTTY</code></a></li>
		<li><a href="#readline"><code>ReadLine</code></a></li>
		<li><a href="#remoteport"><code>RemotePort</code></a></li>
		<li><a href="#tkrunning"><code>tkRunning</code></a></li>
		<li><a href="#nonstop"><code>NonStop</code></a></li>
		<li><a href="#pager"><code>pager</code></a></li>
		<li><a href="#shellbang"><code>shellBang</code></a></li>
		<li><a href="#ornaments"><code>ornaments</code></a></li>
		<li><a href="#recallcommand"><code>recallCommand</code></a></li>
		<li><a href="#lineinfo__where_the_line_number_information_goes"><code>LineInfo</code> - where the line number information goes</a></li>
	</ul>

	<li><a href="#command_support_routines">COMMAND SUPPORT ROUTINES</a></li>
	<ul>

		<li><a href="#list_modules"><code>list_modules</code></a></li>
		<li><a href="#sethelp__"><code>sethelp()</code></a></li>
		<ul>

			<li><a href="#help_message_format">HELP MESSAGE FORMAT</a></li>
		</ul>

		<li><a href="#print_help__"><code>print_help()</code></a></li>
		<li><a href="#fix_less"><code>fix_less</code></a></li>
	</ul>

	<li><a href="#die_and_warn_management">DIE AND WARN MANAGEMENT</a></li>
	<ul>

		<li><a href="#diesignal"><code>diesignal</code></a></li>
		<li><a href="#dbwarn"><code>dbwarn</code></a></li>
		<li><a href="#dbdie"><code>dbdie</code></a></li>
		<li><a href="#warnlevel__"><code>warnlevel()</code></a></li>
		<li><a href="#dielevel"><code>dielevel</code></a></li>
		<li><a href="#signallevel"><code>signalLevel</code></a></li>
	</ul>

	<li><a href="#subroutine_decoding_support">SUBROUTINE DECODING SUPPORT</a></li>
	<ul>

		<li><a href="#cvgv_name__"><code>CvGV_name()</code></a></li>
		<li><a href="#cvgv_name_or_bust_coderef"><code>CvGV_name_or_bust</code> <em>coderef</em></a></li>
		<li><a href="#find_sub"><code>find_sub</code></a></li>
		<li><a href="#methods"><code>methods</code></a></li>
		<li><a href="#methods_via__class___prefix___crawl_upward_"><code>methods_via($class, $prefix, $crawl_upward)</code></a></li>
		<li><a href="#setman__figure_out_which_command_to_use_to_show_documentation"><code>setman</code> - figure out which command to use to show documentation</a></li>
		<li><a href="#runman__run_the_appropriate_command_to_show_documentation"><code>runman</code> - run the appropriate command to show documentation</a></li>
	</ul>

	<li><a href="#debugger_initialization__the_second_begin_block">DEBUGGER INITIALIZATION - THE SECOND BEGIN BLOCK</a></li>
	<li><a href="#readline_support__completion_function">READLINE SUPPORT - COMPLETION FUNCTION</a></li>
	<ul>

		<li><a href="#db_complete">db_complete</a></li>
		<ul>

			<li><a href="#b_postpone_compile"><code>b postpone|compile</code></a></li>
			<li><a href="#b_load"><code>b load</code></a></li>
			<li><a href="#v__list_variable__and_m__list_modules_"><code>V</code> (list variable) and <a href="../lib/Pod/perlguts.html#item_m"><code>m</code></a> (list modules)</a></li>
			<ul>

				<li><a href="#unqualified_package_names">Unqualified package names</a></li>
				<li><a href="#qualified_package_names">Qualified package names</a></li>
			</ul>

			<li><a href="#f__switch_files"><a href="../lib/Pod/perlguts.html#item_f"><code>f</code></a> - switch files</a></li>
			<li><a href="#subroutine_name_completion">Subroutine name completion</a></li>
			<li><a href="#scalar__array__and_hash_completion__partially_qualified_package">Scalar, array, and hash completion: partially qualified package</a></li>
			<li><a href="#symbol_completion__current_package_or_package_main_">Symbol completion: current package or package <code>main</code>.</a></li>
			<li><a href="#options">Options</a></li>
			<li><a href="#filename_completion">Filename completion</a></li>
		</ul>

	</ul>

	<li><a href="#miscellaneous_support_functions">MISCELLANEOUS SUPPORT FUNCTIONS</a></li>
	<ul>

		<li><a href="#end_report">end_report</a></li>
		<li><a href="#clean_env">clean_ENV</a></li>
	</ul>

	<li><a href="#end_processing__the_end_block">END PROCESSING - THE <code>END</code> BLOCK</a></li>
	<li><a href="#pre5_8_commands">PRE-5.8 COMMANDS</a></li>
	<ul>

		<li><a href="#null_command">Null command</a></li>
		<li><a href="#old_a_command_">Old <code>a</code> command.</a></li>
		<li><a href="#old_b_command">Old <a href="../lib/Pod/perlguts.html#item_b"><code>b</code></a> command</a></li>
		<li><a href="#old_d_command_">Old <code>D</code> command.</a></li>
		<li><a href="#old_h_command">Old <code>h</code> command</a></li>
		<li><a href="#old_w_command">Old <code>W</code> command</a></li>
	</ul>

	<li><a href="#preandpostprompt_commands_and_actions">PRE-AND-POST-PROMPT COMMANDS AND ACTIONS</a></li>
	<ul>

		<li><a href="#cmd_pre590_prepost"><code>cmd_pre590_prepost</code></a></li>
		<li><a href="#cmd_prepost"><code>cmd_prepost</code></a></li>
	</ul>

	<li><a href="#db__fake"><code>DB::fake</code></a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>perl5db.pl - the perl debugger</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
    perl -d  your_Perl_script</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p><code>perl5db.pl</code> is the perl debugger. It is loaded automatically by Perl when
you invoke a script with <code>perl -d</code>. This documentation tries to outline the
structure and services provided by <code>perl5db.pl</code>, and to describe how you
can use them.</p>
<p>
</p>
<hr />
<h1><a name="general_notes">GENERAL NOTES</a></h1>
<p>The debugger can look pretty forbidding to many Perl programmers. There are
a number of reasons for this, many stemming out of the debugger's history.</p>
<p>When the debugger was first written, Perl didn't have a lot of its nicer
features - no references, no lexical variables, no closures, no object-oriented
programming. So a lot of the things one would normally have done using such
features was done using global variables, globs and the <a href="../lib/Pod/perlfunc.html#item_local"><code>local()</code></a> operator 
in creative ways.</p>
<p>Some of these have survived into the current debugger; a few of the more
interesting and still-useful idioms are noted in this section, along with notes
on the comments themselves.</p>
<p>
</p>
<h2><a name="why_not_use_more_lexicals">Why not use more lexicals?</a></h2>
<p>Experienced Perl programmers will note that the debugger code tends to use
mostly package globals rather than lexically-scoped variables. This is done
to allow a significant amount of control of the debugger from outside the
debugger itself.</p>
<p>Unfortunately, though the variables are accessible, they're not well
documented, so it's generally been a decision that hasn't made a lot of
difference to most users. Where appropriate, comments have been added to
make variables more accessible and usable, with the understanding that these
<em>are</em> debugger internals, and are therefore subject to change. Future
development should probably attempt to replace the globals with a well-defined
API, but for now, the variables are what we've got.</p>
<p>
</p>
<h2><a name="automated_variable_stacking_via_local__">Automated variable stacking via <a href="../lib/Pod/perlfunc.html#item_local"><code>local()</code></a></a></h2>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?