Hi Raman, I believe the interface between Emacs and JDEbug is fatally flawed. I tried to make it synchronous by using the Emacs accept-process-output command to wait for replies from JDEbug. It appears, thanks to some detective work by JDEE users, that JDEbug sporadically replies to commands from the JDEE so quickly that accept-process-output never sees them and times out, causing the JDEE to think that JDEbug never responded.
I've come up with another, completely asynchronouse interface scheme that does not rely on accept-process-output and hence, I believe, eliminates this irritating command response timeout problem. The new jdb interface uses the scheme and I plan to reimplement JDEbug to use the new scheme in JDEE 2.3.0. - Paul [EMAIL PROTECTED] writes: > Attached is the *JDEBug* buffer, > as well as the output in the *Messages* buffer --for the following: > > Emacs: 20.7 > JVM IBM JDK 1.3.0 > 10:18:38 bubbles tvraman $ java -version > java version "1.3.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) > > Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20001025 (JIT > enabled: jitc)) > > ------------------------------ > App being debugged -- > ASBuilder.java from xerces2/samples --I rebuilt this with debugging > turned on. > > Symptoms: > > When you launch the debugger by: > > 0) start jdebug process (no errors) > 1) Set break points (no errors) > 2) Launch process using C-c C-v C-d > emacs appears to hang, and emits "failed to connect to debugger " > message in *Messages* buffer. > However, it appears to have connected in fact because the break point > is found --and step-over works. > Emacs continues to emit "unable to connect" messages in *Messages*. > 3) Local variables buffer remains empty. > > Here is *JDEBug* buffer --followed by *Messages* > --there are messages in *Messages* that apear to be missing in > *JDEBug* which is why I am appending both. > > -------------------------------------------------- > cd /disk/local1/downloads/build/xerces/samples/dom/ > /usr/java/bin/java -classpath >/home/tvraman/emacs/lisp/site-lisp/jde/java/lib/jde.jar:/usr/java/lib/tools.jar >jde.debugger.Main > > > (jde-dbo-init-debug-session) > > JDE> -1 1 launch 1 -vmexec java -classpath >/usr/share/java/xercesImpl.jar:/usr/share/java/xercesSamples.jar:/usr/share/java/xmlParserAPIs.jar > dom.ASBuilder -a /home/tvraman/ibm/projects/xerces/toy.xsd -i >/home/tvraman/ibm/projects/xerces/toy.xml > > > (jde-dbo-message > 1 "Launched VM 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 (Classic VM, J2RE 1.3.0 IBM build cx130-20001025 (JIT disabled))") > > > (jde-dbo-message 1 "initSIOConnect: starting standard I/O handshake.") > > > (jde-dbo-message 1 "initSIOConnect: starting SIO connect thread.") > > > (jde-dbo-command-result 1 2963) > > > (jde-dbo-message > 1 "Debugger waiting for Emacs to connect to app SIO port 2963.") > > JDE> 1 2 break absolute ASBuilder.java 135 > > > (jde-dbo-message 1 "Debugger connected to standard I/O socket.") > > > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "waiting" "suspended by debugger" > (list) > (list) > nil) > (list 'jde-dbo-vm-start-event)) > > > (jde-dbo-command-result 2 0) > > JDE> 1 3 break absolute ASBuilder.java 130 > > > (jde-dbo-command-result 3 1) > > JDE> 1 4 break absolute ASBuilder.java 128 > > > (jde-dbo-command-result 4 2) > > JDE> 1 5 run > > > (jde-dbo-command-result 5) > > > (jde-dbo-spec-resolved 1 1) > > > (jde-dbo-spec-resolved 1 0) > > > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "runnable" "suspended at breakpoint" > (list > (list 0 "dom.ASBuilder" "ASBuilder.java" 130 "main")) > (list) > nil) > (list 'jde-dbo-breakpoint-hit-event 1 > (list "dom.ASBuilder" "ASBuilder.java" 130) nil nil)) > > JDE> 1 6 get_locals 1 0 > > > (jde-dbo-command-result > 6 (list > (cons (list "argv" "java.lang.String[]") (list "java.lang.String[]" 217 nil)))) > > JDE> 1 7 get_this 1 0 > > > (jde-dbo-command-result 7 (list "null")) > > JDE> 1 8 step over 1 > > > (jde-dbo-command-result 8) > > > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "runnable" "suspended at breakpoint" > (list > (list 0 "dom.ASBuilder" "ASBuilder.java" 135 "main")) > (list) > nil) > (list 'jde-dbo-step-event (list "dom.ASBuilder" "ASBuilder.java" 135)) > (list 'jde-dbo-breakpoint-hit-event 0 > (list "dom.ASBuilder" "ASBuilder.java" 135) nil nil)) > JDE> 1 9 get_locals 1 0 > > > > (jde-dbo-command-result > 9 (list > (cons (list "argv" "java.lang.String[]") (list "java.lang.String[]" 217 nil)))) > > JDE> 1 10 get_this 1 0 > > > (jde-dbo-command-result 10 (list "null")) > > JDE> 1 11 step over 1 > > > (jde-dbo-command-result 11) > > > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "runnable" "suspended by debugger" > (list > (list 0 "dom.ASBuilder" "ASBuilder.java" 137 "main")) > (list) > nil) > (list 'jde-dbo-step-event (list "dom.ASBuilder" "ASBuilder.java" 137))) > > JDE> 1 12 get_locals 1 0 > > > (jde-dbo-command-result > 12 (list > (cons (list "domImpl" "org.apache.xerces.dom3.as.DOMImplementationAS") (list >"org.apache.xerces.dom.DOMImplementationImpl" 223 nil)) > (cons (list "argv" "java.lang.String[]") (list "java.lang.String[]" 217 nil)))) > > JDE> 1 13 get_this 1 0 > > > (jde-dbo-command-result 13 (list "null")) > > > > -------------------------------------------------- > ava -classpath >/usr/share/java/xercesImpl.jar:/usr/share/java/xercesSamples.jar:/usr/share/java/xmlParserAPIs.jar > dom.ASBuilder -a /home/tvraman/ibm/projects/xerces/toy.xsd -i >/home/tvraman/ibm/projects/xerces/toy.xml > > Emacs connected to standard IO port 2963 for process dom.ASBuilder. > Launched VM 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 (Classic VM, J2RE 1.3.0 IBM build cx130-20001025 (JIT disabled)) > initSIOConnect: starting standard I/O handshake. > initSIOConnect: starting SIO connect thread. > Debugger waiting for Emacs to connect to app SIO port 2963. > Setting breakpoint at line 135 in >/disk/local1/downloads/build/xerces/samples/dom/ASBuilder.java. > Debugger connected to standard I/O socket. > vm started... > All threads suspended... > Setting breakpoint at line 130 in >/disk/local1/downloads/build/xerces/samples/dom/ASBuilder.java. > Setting breakpoint at line 128 in >/disk/local1/downloads/build/xerces/samples/dom/ASBuilder.java. > Running dom.ASBuilder. > Resolved breakpoint set in >/disk/local1/downloads/build/xerces/samples/dom/ASBuilder.java at line 130. > Resolved breakpoint set in >/disk/local1/downloads/build/xerces/samples/dom/ASBuilder.java at line 135. > No response to command 7. (process = 1; timeout = 10 sec.) > Error: evaluating debugger output caused a Lisp error. > See *messages* buffer for details. > Error: evaluating output from the debugger caused a Lisp error. > Debugger output: (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "runnable" "suspended at breakpoint" > (list > (list 0 "dom.ASBuilder" "ASBuilder.java" 130 "main")) > (list) > nil) > (list 'jde-dbo-breakpoint-hit-event 1 > (list "dom.ASBuilder" "ASBuilder.java" 130) nil nil)). > Lisp error: (wrong-type-argument (or object-p class-p) nil) > End of buffer > Beginning of buffer [2 times] > No response to command 10. (process = 1; timeout = 10 sec.) > Error: evaluating debugger output caused a Lisp error. > See *messages* buffer for details. > Error: evaluating output from the debugger caused a Lisp error. > Debugger output: > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "runnable" "suspended at breakpoint" > (list > (list 0 "dom.ASBuilder" "ASBuilder.java" 135 "main")) > (list) > nil) > (list 'jde-dbo-step-event (list "dom.ASBuilder" "ASBuilder.java" 135)) > (list 'jde-dbo-breakpoint-hit-event 0 > (list "dom.ASBuilder" "ASBuilder.java" 135) nil nil)). > Lisp error: (wrong-type-argument (or object-p class-p) nil) > No response to command 13. (process = 1; timeout = 10 sec.) > Error: evaluating debugger output caused a Lisp error. > See *messages* buffer for details. > Error: evaluating output from the debugger caused a Lisp error. > Debugger output: > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "runnable" "suspended by debugger" > (list > (list 0 "dom.ASBuilder" "ASBuilder.java" 137 "main")) > (list) > nil) > (list 'jde-dbo-step-event (list "dom.ASBuilder" "ASBuilder.java" 137))). > Lisp error: (wrong-type-argument (or object-p class-p) nil) > > -- > Best Regards, > --raman > ------------------------------------------------------------ > T. V. Raman: PhD (Cornell University) > IBM Research: Human Language Technologies > Architect: Conversational And Multimodal WWW Standards > Phone: 1 (408) 927 2608 > Fax: 1 (408) 927 3012 > Email: [EMAIL PROTECTED] > WWW: http://www.cs.cornell.edu/home/raman > AIM: TVRaman > PGP: http://emacspeak.sf.net/raman.asc > Snail: IBM Almaden Research Center, > 650 Harry Road > San Jose 95120 >
