At 01:11 PM 11/15/00 -0800, Zhou Ye wrote:
>
>Hi all,
>
>I am a new comer of JDE and am excited to have a Java environment for
>emacs. The feature that most interest me is the ability to debug Java
>programs within Emacs.
>
>I am using JDK1.3 and JDE225(elib 1.0, semantic131, speedbar0.13a).
>I've just got them installed and working to some extend. I do encounter
>some issues and would like to ask for your help/clarification:
>
>A) Using JDebug in general.
>
>I can't find an interactive environment for me to issue(by typing) debug
>commands such as next, cont (like the way I use gdb for example). Did I
>miss something?
>
No. You did not miss anything. JDEbug was designed to be run from the Emacs
desktop, and consequently take advantage of amenities that Emacs offers
that a command window does not, such as menus, keybindings, and minibuffer
commands with completion.
>B) Using JDebug to attach a process.
>
>I can issue the commands to attach to an app I ran outside of
>emacs(shmem, address=jdebug) and attach to it in JDebug, see JDebug
>message below:
>
>
>_______________________
>
>*** Debugger Output for Process jdebug(4) ***
>
>Attached to process jdebug.
>Attached VM (shmem) Java Debug Interface (Reference Implementation)
>version 1.3
>Java Debug Wire Protocol (Reference Implementation) version 1.0
>JVM Debug Interface version 1.0
>JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode)
>
>_______________________
>
>At this point, nothing is happening in the emacs. I clicked on
>"JDebug->Continue" the following shows:
>
>_______________________
>
>Running jdebug
>
>_______________________
>
>
>And again nothing seems to be happening. I can't figure out what the
>problem is. I am also not sure if I use the name jdebug correctly.
>(after I clicked on attach->shared memory, the minibuffer prompts for
>"process name" and that's where I entered "jdebug") I tried to use other
>names but did not seem to make any difference.
>
You have to set a breakpoint somewhere and then prod the application to run
to the breakpoint. You can then start stepping.
>c) Using jdb
>
>I then tried to use jdb. I was able to set it up and debug an app
>launched by jdb. Stepping thru the code also seemed to work fine.
>
>However, I can 't figure out how to make it to do attach. I tried a few
>things but can't seem to make JDE to accept my "-attach" correctly.
>
>Is there a way to use jdb for attaching?
>
The JDE does not really support attaching jdb to an existing process. It's
possible to do it by setting the right debug options. You have to turn off
some things and turn on others. I've forgotten the details of how to do it.
- Paul