forked from spring-projects/spring-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.dev
32 lines (27 loc) · 1.53 KB
/
readme.dev
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
======================================================================
DEBUGGING VIA ECLIPSE
======================================================================
Most of the time we just use the spring-shell line tool directly
from the command line. This we have found is the fastest approach and
also lets us see exactly what a user would see, including the TAB
completion features. Still, sometimes you have a tricky issue you'd
prefer to work through via the STS/Eclipse debugger. When you do this
you need to be aware that you lose the full capabilities of the shell,
as the JLine library (used for command line parsing) is unable to
fully hook into your operating system's keyboard and ANSI services.
Anyhow, for some issues a debugger is worth the minor price of losing
your full keyboard and colour services! :-)
To setup debugging, open org.springframework.shell.Bootstrap.
Note it has a Java "main" method. Execute the class using Run As >
Java Application. Note the "Console" tab in Eclipse/STS will open.
Type "quit" then hit enter. Now select Run > Debug Configurations.
Select the Java Application > Bootstrap entry. Click on Arguments
and then add the following VM Arguments:
*nix machines:
-Djline.terminal=org.springframework.shell.core.IdeTerminal
Windows machines:
-Djline.WindowsTerminal.directConsole=false
-Djline.terminal=jline.UnsupportedTerminal
Finally, set the working directory to "Other" and a location on your
disk where you'd like the spring-shell to be loaded. This is usually a
project you're intending to test with.