A wrapper script to enhance jdb
. It gives jdb
:
delete
command to delete break point with indexbreak
command to declare conditional break point- command history
- command completion
- local variable name completion
- class name comletion
- field/method name completion
- command name abbreviation
- reading break points in file at startup
- reading sourcepath in file at startup
- repeating the last command with enter key
- and displays
list
,where
,locals
,dump this
at every time a thread is suspended - shortcut keys in source code pane to control the program execution
-
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}
# pjdb [jdb options]
pjdb
passes all options to jdb
.
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 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")
>
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.
Hitting TAB
key fills in the rest of an item.
s => step
c => cont
p => print
n => next
w => where
d => dump
l => list
b => break
If the pjdb.breakpoint
file exists in the current directory, pjdb
reads it and set break points at startup.
If the pjdb.sourcepath
file exists in the current directory, pjdb
reads it and set source paths at startup.
After executing step
, cont
, and next
command, hitting ENTER
key repeats the last command.
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
Hisanobu Okuda [email protected]