Devel-ptkdb
view release on metacpan or search on metacpan
on the terminally pedantic.
Data::Dumper is now a requirement for running. This has been included with perl
since 5.00505.
1.1067 Fixed a problem where ptkdb would not evaluate an expression such as 'keys %hash' in
its expression window.
Fixed some problems with balloons coordinate system and made them respond faster.
1.1063 Menu initialization has been 'tuned' up a bit. New handling for closure of window
and quit. Beginning to deal with 'reused' addresses.
1.1059 Corrected a bug where vars in the dbval subroutine could eclipse
vars that were in targe code
1.1052 Added a configuration option that allows users to change
the packing arrangement of the code and notebook panes.
Use xresource ptkdb*codeside: left|right|top|bottom
Or environmental var PTKDB_CODE_SIDE=left|right|top|bottom
# ptkdb*codeside: left
# /*
# * Background color for the balloon
# * CAUTION: For certain versions of Tk trailing
# * characters after the color produces an error
# */
# ptkdb.frame2.frame1.rotext.balloon.background: green
# ptkdb.frame2.frame1.rotext.balloon.font: fixed /* Hot Variable Balloon Font */
#
#
# ptkdb.frame*font: fixed /* Menu Bar */
# ptkdb.frame.menubutton.font: fixed /* File menu */
# ptkdb.frame2.frame1.rotext.font: fixed /* Code Pane */
# ptkdb.notebook.datapage.frame1.hlist.font: fixed /* Expression Notebook Page */
#
# ptkdb.notebook.subspage*font: fixed /* Subroutine Notebook Page */
# ptkdb.notebook.brkptspage*entry.font: fixed /* Delete Breakpoint Buttons */
# ptkdb.notebook.brkptspage*button.font: fixed /* Breakpoint Expression Entries */
# ptkdb.notebook.brkptspage*button1.font: fixed /* Breakpoint Expression Entries */
# ptkdb.notebook.brkptspage*checkbutton.font: fixed /* Breakpoint Checkbuttons */
# ptkdb.notebook.brkptspage*label.font: fixed /* Breakpoint "Cond" label */
Presents a list of the breakpoints current in use. The pushbutton
allows a breakpoint to be 'disabled' without removing it. Expressions
can be applied to the breakpoint. If the expression evaluates to be
'true'(results in a defined value that is not 0) the debugger will
stop the script. Pressing the 'Goto' button will set the text pane
to that file and line where the breakpoint is set. Pressing the
'Delete' button will delete the breakpoint.
=back
=head1 Menus
=head2 File Menu
=over
=item About...
Presents a dialog box telling you about the version of ptkdb. It
recovers your OS name, version of perl, version of Tk, and some other
information
=item Open
Prompts for text to search for. Options include forward search,
backwards search, and regular expression searching.
=item Quit
Causes the debugger and the target script to exit.
=back
=head2 Control Menu
=over
=item Run
The debugger allows the script to run to the next breakpoint or until the script exits.
item Run To Here
Runs the debugger until it comes to wherever the insertion cursor
in text window is placed.
until the current line has executed.
This feature can be turned on at startup by adding:
$DB::ptkdb::stop_on_warning = 1 ;
to a .ptkdbrc file
=back
=head2 Data Menu
=over
=item Enter Expression
When an expression is entered in the "Enter Expression:" text box,
selecting this item will enter the expression into the expression
list. Each time the debugger stops this expression will be evaluated
and its result updated in the list window.
HINT: You can enter multiple expressions by separating them with commas.
=item Use Data::Dumper for Eval Window
Enables or disables the use of Data::Dumper for formatting the results
of expressions in the Eval window.
=back
=head2 Stack Menu
Maintains a list of the current subroutine stack each time the
debugger stops. Selecting an item from this menu will set the text in
the code window to that particular subourtine entry point.
=head2 Bookmarks Menu
Maintains a list of bookmarks. The booksmarks are saved in ~/.ptkdb_bookmarks
=over
=item Add Bookmark
Adds a bookmark to the bookmark list.
=back
/*
* Background color for the balloon
* CAUTION: For certain versions of Tk trailing
* characters after the color produces an error
*/
ptkdb.frame2.frame1.rotext.balloon.background: green
ptkdb.frame2.frame1.rotext.balloon.font: fixed /* Hot Variable Balloon Font */
ptkdb.frame*font: fixed /* Menu Bar */
ptkdb.frame.menubutton.font: fixed /* File menu */
ptkdb.frame2.frame1.rotext.font: fixed /* Code Pane */
ptkdb.notebook.datapage.frame1.hlist.font: fixed /* Expression Notebook Page */
ptkdb.notebook.subspage*font: fixed /* Subroutine Notebook Page */
ptkdb.notebook.brkptspage*entry.font: fixed /* Delete Breakpoint Buttons */
ptkdb.notebook.brkptspage*button.font: fixed /* Breakpoint Expression Entries */
ptkdb.notebook.brkptspage*button1.font: fixed /* Breakpoint Expression Entries */
ptkdb.notebook.brkptspage*checkbutton.font: fixed /* Breakpoint Checkbuttons */
ptkdb.notebook.brkptspage*label.font: fixed /* Breakpoint Checkbuttons */
$self->setup_options() ; # must be done after MainWindow and before other frames are setup
$self->{main_window}->bind('<Control-c>', \&DB::dbint_handler) ;
#
# Bind our 'quit' routine to a close command from the window manager (Alt-F4)
#
$self->{main_window}->protocol('WM_DELETE_WINDOW', sub { $self->close_ptkdb_window() ; } ) ;
# Menu bar
$self->setup_menu_bar() ;
#
# setup Frames
#
# Setup our Code, Data, and breakpoints
$self->setup_frames() ;
-command => sub { $self->DoQuit } ]
] ;
$mw->bind('<Alt-g>' => sub { $self->GotoLine() ; }) ;
$mw->bind('<Control-f>' => sub { $self->FindText() ; }) ;
$mw->bind('<Control-r>' => \&Devel::ptkdb::DoRestart) ;
$mw->bind('<Alt-q>' => sub { $self->{'event'} = 'quit' } ) ;
$mw->bind('<Alt-w>' => sub { $self->close_ptkdb_window ; }) ;
$self->{file_menu_button} = $mb->Menubutton(-text => 'File',
-underline => 0,
-menuitems => $items
)->pack(-side =>, 'left',
-anchor => 'nw',
-padx => 2) ;
# Control Menu
my $runSub = sub { $DB::step_over_depth = -1 ; $self->{'event'} = 'run' } ;
my $runToSub = sub { $DB::window->{'event'} = 'run' if $DB::window->SetBreakPoint(1) ; } ;
my $stepOverSub = sub { &DB::SetStepOverBreakPoint(0) ;
$DB::single = 1 ;
$DB::window->{'event'} = 'step' ;
} ;
[ 'command' => 'Return', -accelerator => 'Alt+U', -underline => 3, -command => $returnSub ],
'-',
[ 'command' => 'Restart...', -accelerator => 'Ctrl-r', -underline => 0, -command => \&Devel::ptkdb::DoRestart ],
'-',
[ 'checkbutton' => 'Stop On Warning', -variable => \$DB::ptkdb::stop_on_warning, -command => \&set_stop_on_warning ]
] ; # end of control menu items
$self->{control_menu_button} = $mb->Menubutton(-text => 'Control',
-underline => 0,
-menuitems => $items,
)->pack(-side =>, 'left',
-padx => 2) ;
$mw->bind('<Alt-r>' => $runSub) ;
$mw->bind('<Alt-t>', $runToSub) ;
$mw->bind('<Control-b>', sub { $self->SetBreakPoint ; }) ;
}
for( @Devel::ptkdb::step_in_keys ) {
$mw->bind($_ => $stepInSub );
}
for( @Devel::ptkdb::return_keys ) {
$mw->bind($_ => $returnSub );
}
# Data Menu
$items = [ [ 'command' => 'Enter Expression', -accelerator => 'Alt+E', -command => sub { $self->EnterExpr() } ],
[ 'command' => 'Delete Expression', -accelerator => 'Ctrl+D', -command => sub { $self->deleteExpr() } ],
[ 'command' => 'Delete All Expressions', -command => sub {
$self->deleteAllExprs() ;
$self->{'expr_list'} = [] ; # clears list by dropping ref to it, replacing it with a new one
} ],
'-',
[ 'command' => 'Expression Eval Window...', -accelerator => 'F8', -command => sub { $self->setupEvalWindow() ; } ],
[ 'checkbutton' => "Use DataDumper for Eval Window?", -variable => \$Devel::ptkdb::useDataDumperForEval, @dataDumperEnableOpt ]
] ;
$self->{data_menu_button} = $mb->Menubutton(-text => 'Data', -menuitems => $items,
-underline => 0,
)->pack(-side => 'left',
-padx => 2) ;
$mw->bind('<Alt-e>' => sub { $self->EnterExpr() } ) ;
$mw->bind('<Control-d>' => sub { $self->deleteExpr() } );
$mw->bind('<F8>', sub { $self->setupEvalWindow() ; }) ;
#
# Stack menu
#
$self->{stack_menu} = $mb->Menubutton(-text => 'Stack',
-underline => 2,
)->pack(-side => 'left',
-padx => 2) ;
#
# Bookmarks menu
#
$self->{bookmarks_menu} = $mb->Menubutton(-text => 'Bookmarks',
-underline => 0,
@dataDumperEnableOpt
)->pack(-side => 'left',
-padx => 2) ;
$self->setup_bookmarks_menu() ;
#
# Windows Menu
#
my($bsub) = sub { $self->{'text'}->focus() } ;
my($csub) = sub { $self->{'quick_entry'}->focus() } ;
my($dsub) = sub { $self->{'entry'}->focus() } ;
$items = [ [ 'command' => 'Code Pane', -accelerator => 'Alt+0', -command => $bsub ],
[ 'command' => 'Quick Entry', -accelerator => 'F9', -command => $csub ],
[ 'command' => 'Expr Entry', -accelerator => 'F11', -command => $dsub ]
] ;
$mb->Menubutton(-text => 'Windows', -menuitems => $items
)->pack(-side => 'left',
-padx => 2) ;
$mw->bind('<Alt-0>', $bsub) ;
$mw->bind('<F9>', $csub) ;
$mw->bind('<F11>', $dsub) ;
#
# Bar for some popular controls
#
$self->{'text'}->tagAdd('search_tag', @{$self->{search_tag}}) ;
} # end of text found
$entry->selectionRange(0, 'end') if $entry->can('selectionRange') ;
} # end of FindSearch
#
# Support for the Find Text... Menu command
#
sub FindText {
my ($self) = @_ ;
my ($top, $entry, $rad1, $rad2, $chk, $regExp, $frm, $okayBtn) ;
#
# if we already have the Find Text Window
# open don't bother openning another, bring
# the existing one to the front.
#
return ;
}
} # end of sub
1 ; # return true value
# ptkdb.pm,v
# Revision 1.15 2004/03/31 02:08:40 aepage
# fixes for various lacks of backwards compatiblity in Tk804
# Added a 'bug report' item to the File Menu.
#
# Revision 1.14 2003/11/20 01:59:40 aepage
# version fix
#
# Revision 1.12 2003/11/20 01:46:45 aepage
# Hex Dumper and correction of some parameters for Tk804.025_beta6
#
# Revision 1.11 2003/06/26 13:42:49 aepage
# fix for chars at the end of win32 platforms.
#
( run in 1.034 second using v1.01-cache-2.11-cpan-49f99fa48dc )