At 08:07 AM 4/29/2001 -0400, "Javier Lopez" <[EMAIL PROTECTED]> wrote: >Hi Paul, > >I found more information that might be useful in >solving the problem. >I tried debugging a test application by doing JDE->Debug App. >I got the error no response to command 1. > >When I looked in the *JDEbug* buffer this is what I saw. > >cd d:/code/ >javaw -classpath >d:/emacs-20.7/site-lisp/jde/java/lib/jde.jar;d:/jdk1.3/lib/tools.jar >jde.debugger.Main > > >(jde-dbo-init-debug-session) > >JDE> -1 1 launch 1 -vmexec javaw test > > >(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_02 (Java HotSpot(TM) Client VM, interpreted mode)") > > >(jde-dbo-message 1 "initSIOConnect: starting standard I/O handshake.") > >I tried running the debugger on the command prompt and I noticed that the >"launch" >command produce more output than this. The missing output is the reason why >it >hangs. >Emacs is waiting for the port number to connect, the debugger already >sent all >this information so is waiting for Emacs to connect to the port, since emacs >never got the >info. The wait for each other. Yes. I've known all along that the failure of Emacs/JDE on SOME systems (not on mine or many others) to get the port number message is causing the hang. The problem is WHY is the message blocked? >I notice that by sending a eof signal to the *JDEbug* process the rest of >the information >shows up. I tried this out, and it worked. > I added the this line of code >(process-send-eof (process-name debugger-process)) in the method >jde-dbs-cmd-exec. >Now Emacs got the port number, connected, and issued a second command "1 2 >run". > The problem with this solution is that sending an EOF to the standard input of JDEbug causes JDEbug to stop reading its standard input. Hence it ignores succeeding commands from Emacs/JDE, hence it does not reply to them, hence the following error: >I got a different error "No response to command 2. >I think the reason is the emacs sent the second command before the debugger >connected to >the port, because the *JDebug* buffer shows emacs sending the command and >then the >debugger signaling that it connected to the port. > We need to find some other solution to the blocked port message problem. The problem seems to be system dependent. I don't know why. Perhaps it's a threading problem. BTW, below is the output of a "normal" JDEbug session that starts a process, runs to a breakpoint, and then runs to completion. Perhaps it may be of some help to you in debugging this problem. - Paul javaw -classpath c:/applications/cygwin/home/jde-dev/jde/java/classes;c:/java/jdk1.3.1/lib/to ols.jar -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=2112,server=y,suspend=n jde.debugger.Main (jde-dbo-init-debug-session) JDE> -1 9 launch 2 -vmexec javaw -classpath c:/applications/cygwin/home/jde-dev/jmath/src;c:/applications/cygwin/home/jd e-dev/jmath/classes jmath.Test (jde-dbo-message 2 "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.1-rc1 (Java HotSpot(TM) Client VM, interpreted mode)") (jde-dbo-message 2 "initSIOConnect: starting standard I/O handshake.") (jde-dbo-message 2 "initSIOConnect: starting SIO connect thread.") (jde-dbo-command-result 9 2696) (jde-dbo-message 2 "Debugger waiting for Emacs to connect to app SIO port 2696.") (jde-dbo-event-set 2 "all" (list "Thread" 1 "main" "unknown" "suspended by debugger" (list) "VM has no information" "VM has no information") (list 'jde-dbo-vm-start-event)) JDE> 2 10 break absolute Test.java 24 (jde-dbo-message 2 "Debugger connected to standard I/O socket.") (jde-dbo-command-result 10 0) JDE> 2 11 run (jde-dbo-command-result 11) (jde-dbo-spec-resolved 2 0) (jde-dbo-event-set 2 "all" (list "Thread" 1 "main" "runnable" "suspended at breakpoint" (list (list 0 "jmath.Test" "Test.java" 24 "main")) "VM has no information" "VM has no information") (list 'jde-dbo-breakpoint-hit-event 0 (list "jmath.Test" "Test.java" 24) nil nil)) JDE> 2 12 get_locals 1 0 (jde-dbo-command-result 12 (list (cons (list "k" "int") (list "int" "89")) (cons (list "B" "double[]") (list "double[]" 223 nil)) (cons (list "A" "double[][]") (list "double[][]" 222 nil)) (cons (list "Args" "java.lang.String[]") (list "java.lang.String[]" 221 nil)))) JDE> 2 13 get_this 1 0 (jde-dbo-command-result 13 (list "null")) JDE> 2 14 get_thread 1 (jde-dbo-command-result 14 (list "Thread" 1 "main" "runnable" "suspended at breakpoint" (list (list 0 "jmath.Test" "Test.java" 24 "main")) "VM has no information" "VM has no information")) JDE> 2 15 run (jde-dbo-command-result 15) (jde-dbo-event-set 2 "none" nil (list 'jde-dbo-vm-death-event)) (jde-dbo-message 2 "Closed transport for application's standard output.") (jde-dbo-message 2 "Closed transport for application's standard error output.") (jde-dbo-event-set 2 "none" nil (list 'jde-dbo-vm-disconnected-event))
