When the 'locals' command is issued on a running thread, the error message is misleading (in a way which can be frustrating).
Type the following:
jdb Test
run
locals
The output is
No local variables: try compiling with -g
But this is misleading - it SHOULD say
Thread isn't suspended.
--- Here is the test case code:
public class Test
{
public static void main(String argv[])
{
int j = 0;
while (true) {
j++;
}
}
}
Type the following:
jdb Test
run
locals
The output is
No local variables: try compiling with -g
But this is misleading - it SHOULD say
Thread isn't suspended.
--- Here is the test case code:
public class Test
{
public static void main(String argv[])
{
int j = 0;
while (true) {
j++;
}
}
}