Skip to content

hokuda/pjdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pjdb

MIT License

screen-shot

A wrapper script to enhance jdb. It gives jdb:

Dependencies

Installation

  • install python3

    $ sudo dnf install python3
    
  • install rlwrap

    $ git clone https://github.com/hanslub42/rlwrap.git
    $ cd rlwrap/
    $ autoreconf --install
    $ ./configure 
    $ make
    $ sudo make install
    
  • install tornado, websocket-client, and ptterm

    $ git clone https://github.com/hokuda/pjdb.git
    $ cd pjdb
    $ pip3 install --user -r requirements.txt
    

    Note: You may need to install one of the copy/paste mechanisms listed here

  • install pjdb

    $ cp pjdb pjdb_filter ${path_to_your_favorite_bin_directory}
    

How to use

  # pjdb [jdb options]

pjdb passes all options to jdb.

Features

delete command

delete command shows break points with indeces. delete # command deletes the #th break point.

  > delete
       0 Test:22
       1 Test:23 if arg.equals("test1")
       2 Test:24
       3 Test.test()
  > delete 2
  Deleted: Test:24
  > delete
       0 Test:22
       1 Test:23 if arg.equals("test1")
       2 Test.test()
  > 

break command

break command shows break points with indeces.

break <class>.<method>[(argument_type,...)] command sets a break point in a method.

break <class>:<line> command sets a break point at a line. A break point at a line can have a condition by using if in the arguments to the break command like break <class>:<line> if <condition>. <condition> must be a boolean Java expression.

> break
     0 Test:22
     1 Test:23 if arg.equals("test1")
     2 Test.test()
> break Test:24 if arg.equals("test2")
Added "Test:24 if arg.equals("test2")"
> break
     0 Test:22
     1 Test:23 if arg.equals("test1")
     2 Test.test()
     3 Test:24 if arg.equals("test2")
> 

command history

C-r and C-s are available to search history. If the pjdb.history file exists in the current directory, pjdb reads it at startup. The command history is saved when pjdb exits.

completion

Hitting TAB key fills in the rest of an item.

command name abbreviation

s => step
c => cont
p => print
n => next
w => where
d => dump
l => list
b => break

reading break points in file at startup

If the pjdb.breakpoint file exists in the current directory, pjdb reads it and set break points at startup.

reading sourcepath in file at startup

If the pjdb.sourcepath file exists in the current directory, pjdb reads it and set source paths at startup.

repeating the last command with enter key

After executing step, cont, and next command, hitting ENTER key repeats the last command.

shortcut keys in source code pane to control the program execution

Shortcut keys are available in source code pane to step through your code and set break points.

s => step
n => next
u => step up
c => cont
b => set/remove break point at the current line

Author

Hisanobu Okuda hisanobu.okuda@gmail.com

Releases

No releases published

Packages

No packages published

Languages