Как пропустить точку останова определенное количество раз в jdb? помощьКак пропустить точку останова определенное количество раз в jdb Java?
JDB обеспечивает эту подсказку:
!! -- repeat last command
<n> <command> -- repeat command n times
# <command> -- discard (no-op)
При попытке пропустить точки останова п число раз, однако, как это:
80 cont
или как это:
80 run
jdb barfs:
main[1] 80 cont
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
Breakpoint hit: main[1] > Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.Exception in thread "event-handler" java.lang.NullPointerException
at com.sun.tools.example.debug.tty.TTY.printCurrentLocation(TTY.java:212)
at com.sun.tools.example.debug.tty.TTY.vmInterrupted(TTY.java:189)
at com.sun.tools.example.debug.tty.EventHandler.run(EventHandler.java:86)
at java.lang.Thread.run(Thread.java:619)
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
> Nothing suspended.
Что здесь происходит? Как я могу получить желаемое поведение?
Версия:
> version
This is jdb version 1.6 (J2SE version 1.6.0_16)
Java Debug Interface (Reference Implementation) version 1.6
Java Debug Wire Protocol (Reference Implementation) version 1.6
JVM Debug Interface version 1.1
JVM version 1.6.0_17 (Java HotSpot(TM) Client VM, mixed mode, sharing)
Чтобы уточнить, я отладки удаленно. Например, мое первое окно начинается так:
% java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n LZWDecompress
и мое второе окно начинается так:
% jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8000
Хех. ;) Мой редактор в настоящее время Notepad ++! : D Спасибо за эти предложения. – iokevins