-
Notifications
You must be signed in to change notification settings - Fork 0
/
jdb-quickstart.txt
62 lines (52 loc) · 1.8 KB
/
jdb-quickstart.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
This is an ultra quick start to jdb
Hopefully you are a little familiar with gdb, since jdb resembles it lightly.
Notable differences:
- a breakpoint is set with "stop in <class>.<method>" or "<class>:<line>".
- no tab completion
- no readline (cursor up/down)
- no shortcuts; you have to write "run", not "r" to run the program
- no listing files before the class was loaded
- much easier method to specify the location of the source: "use <dir>"
- "until" is "step", "step" is "stepi"
Okay, so here you go, a little demonstration:
$ ./ImageJ --jdb
> stop in ij.ImageJ.main
Deferring breakpoint ij.ImageJ.main.
It will be set after the class is loaded.
> run
run ij.ImageJ
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint ij.ImageJ.main
Breakpoint hit: "thread=main", ij.ImageJ.main(), line=466 bci=0
main[1] use .
main[1] list
462 //prefs.put(IJ_HEIGHT, Integer.toString(size.height));
463 }
464
465 public static void main(String args[]) {
466 => if (System.getProperty("java.version").substring(0,3).compareTo("1.4")<0) {
467 javax.swing.JOptionPane.showMessageDialog(null,"ImageJ "+VERSION+" requires Java 1.4.1 or later.");
468 System.exit(0);
469 }
470 boolean noGUI = false;
471 arguments = args;
main[1] print args[0]
java.lang.IndexOutOfBoundsException: Invalid array range: 0 to 0
args[0] = null
main[1] print args.length
args.length = 0
main[1] step
>
Step completed: "thread=main", ij.ImageJ.main(), line=470 bci=28
470 boolean noGUI = false;
main[1] step
>
Step completed: "thread=main", ij.ImageJ.main(), line=471 bci=30
471 arguments = args;
main[1] set noGUI = true
noGUI = true = true
main[1] cont
>
The application exited