Devel-tkdb

 view release on metacpan or  search on metacpan

Xresources.sample  view on Meta::CPAN

  * Perl Tk Debugger XResources.  
  * Note... These resources are subject to change.  
  *
  * Use 'xfontsel' to select different fonts.
  *
  * Append these resource to ~/.Xdefaults | ~/.Xresources
  * and use xrdb -override ~/.Xdefaults | ~/.Xresources
  * to activate them.  
  */

ptkdb.frame*font: fixed                           /* Menu Bar */
ptkdb.frame2.frame1.rotext.font: fixed            /* Code Pane */
             
ptkdb.toplevel.frame.textundo.font: fixed         /* Eval Expression Entry Window */
ptkdb.toplevel.frame1.text.font: fixed            /* Eval Expression Results Window */
ptkdb.toplevel.button.font:  fixed                /* "Eval..." Button */
ptkdb.toplevel.button1.font: fixed                /* "Clear Eval" Button */
ptkdb.toplevel.button2.font: fixed                /* "Clear Results" Button */
ptkdb.toplevel.button3.font: fixed                /* "Clear Dismiss" Button */


tkdb.pm  view on Meta::CPAN

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 tkdb.  It
recovers your OS name, version of perl, version of Tcl/Tk, and some other
information

=item Open

tkdb.pm  view on Meta::CPAN


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

tkdb.pm  view on Meta::CPAN

until the current line has executed.  

This feature can be turned on at startup by adding:

  $DB::tkdb::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.

tkdb.pm  view on Meta::CPAN


Pops up a two pane window. Expressions of virtually unlimitted length
can be entered in the top pane.  Pressing the 'Eval' button will cause
the expression to be evaluated and its placed in the lower pane. 
Undo is enabled for the text in the upper pane.

HINT:  You can enter multiple expressions by separating them with commas.  

=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

tkdb.pm  view on Meta::CPAN

    * Perl Tk Debugger XResources.   
    * Note... These resources are subject to change.   
    *
    * Use 'xfontsel' to select different fonts.
    *
    * Append these resource to ~/.Xdefaults | ~/.Xresources
    * and use xrdb -override ~/.Xdefaults | ~/.Xresources
    * to activate them. 
    */

    ptkdb.frame*font: fixed                    /* Menu Bar */
    ptkdb.frame2.frame1.rotext.font: fixed     /* Code Pane */

    ptkdb.toplevel.frame.textundo.font: fixed  /* Eval Expression Entry Window */
    ptkdb.toplevel.frame1.text.font: fixed     /* Eval Expression Results Window */
    ptkdb.toplevel.button.font:  fixed         /* "Eval..." Button */
    ptkdb.toplevel.button1.font: fixed         /* "Clear Eval" Button */
    ptkdb.toplevel.button2.font: fixed         /* "Clear Results" Button */
    ptkdb.toplevel.button3.font: fixed         /* "Clear Dismiss" Button */

=head1 Environmental Variables

tkdb.pm  view on Meta::CPAN

  #
  # 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(); } );

  #
  # setup Frames
  # Setup our Code, Data, and breakpoints
  $self->setup_frames();

  # Menu bar
  $self->setup_menu_bar();
}

#
# Check for changes to the bookmarks and quit
#
sub DoQuit {
    print STDERR "DoQuit\n";
    my($self) = @_;

tkdb.pm  view on Meta::CPAN

             ];


  $mw->bind('<Alt-g>' =>  sub { $self->GotoLine() ; }) ;
  $mw->bind('<Control-f>' => sub { $self->FindText() ; }) ;
  $mw->bind('<Control-r>' => \&Devel::tkdb::DoRestart) ;
  $mw->bind('<Alt-q>' => 'set event quit' );
  $mw->bind('<Alt-w>' => sub { $self->close_ptkdb_window ; });


  # Control Menu

  my $runSub = sub { $DB::step_over_depth = -1 ; $int->SetVar('event','run') };

  my $runToSub = sub { $int->SetVar('event','run') if  $DB::window->SetBreakPoint(1) ; } ;

  my $stepOverSub = sub { &DB::SetStepOverBreakPoint(0) ; 
                        $DB::single = 1 ; 
                        $int->SetVar('event','step');
		    } ;

tkdb.pm  view on Meta::CPAN

  }

  # keys for step into a subroutine 
  for ('<Shift-F9>', '<Alt-s>') {
    $mw->bind($_ => $stepInSub );
  }

  # return from a subroutine
  $mw->bind('<Alt-u>' => $returnSub );

  # Data Menu

  my $items3 = [ [ 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'} = [];
                                     } ],
             '-',
             [ command => 'Expression Eval Window...', -accelerator => 'F8', -command => sub { $self->setupEvalWindow() ; } ],
	  ];

  $mw->bind('<Alt-e>' => sub { $self->EnterExpr() } ) ;
  $mw->bind('<Control-d>' => sub { $self->deleteExpr() } );
  $mw->bind('<F8>', sub { $self->setupEvalWindow() ; }) ;

  #
  # Windows Menu
  #
  my $bsub = "focus $self->{text}";
  my $csub = "focus $self->{quick_entry}";
  my $dsub = "focus $self->{entry}";

  my $items4 = [ [ command => 'Code Pane', -accelerator => 'Alt+0', -command => $bsub ],
             [ command => 'Quick Entry', -accelerator => 'F9', -command => $csub ],
             [ command => 'Expr Entry', -accelerator => 'F11', -command => $dsub ]
           ];

  $mw->bind('<Alt-0>', $bsub);
  $mw->bind('<F9>', $csub);
  $mw->bind('<F11>', $dsub);

  my $menu = $mw->Menu(-menuitems => [
          [Cascade=>'File', -tearoff => 0, -underline=>0, -menuitems=>$items1],
          [Cascade=>'Control', -tearoff=>0, -underline=>0, -menuitems => $items2],
	  [Cascade=>'Data', -tearoff=>0, -menuitems => $items3, -underline => 0],
          [Cascade=>'Stack', -tearoff=>0, -underline => 2],
          [Cascade=>'Bookmarks', -tearoff=>0, -underline=>0],
	  [Cascade=>'Windows', -tearoff=>0, -menuitems => $items4]
      ]);
  #
  # Stack menu
  $self->{stack_menu} = $int->widget($menu->entrycget(4,'-menu'),'Menubutton');
  #
  # Bookmarks menu
  $self->{bookmarks_menu} = $int->widget($menu->entrycget(5,'-menu'),'Menubutton');

  $self->setup_bookmarks_menu();

  $mw->config(-menu=>$menu);

  #
  # Bar for some popular controls
  my $bb = $mw->Frame()->pack(-side => 'top');

  $bb->Button(-text => "Step In", -command => $stepInSub) ->pack(-side => 'left');

tkdb.pm  view on Meta::CPAN


    $self->{'text'}->tagAdd('search_tag', @{$self->{search_tag}}) ;
  } # end of text found

  $entry->_selectionRange(0, 'end');

} # end of FindSearch


#
# Support for the Find Text... Menu command
#
sub FindText {
  my ($self) = @_ ;
  my ($okayBtn);

  #
  # if we already have the Find Text Window open don't bother openning
  # another, bring the existing one to the front.  
  if( $self->{find_window} ) {
    $self->{find_window}->raise();



( run in 1.224 second using v1.01-cache-2.11-cpan-49f99fa48dc )