Re: Debugger

From: Peter Bradley (apvx95_at_dsl.pipex.com)
Date: 12/21/03


Date: Sun, 21 Dec 2003 21:18:47 -0000

Thomas,

I now have a bit more info.

First I found that jdb was not on my path, so I fixed that. Still no joy in
the IDE.

Ran

jdb <myClass> // <myClass> represents the name of the class I'm trying to
debug

from the command line and everything works fine (except for the interface!).
That is, the program stopped at the first line, I could set a breakpoint,
stop at the breakpoint, step through the code etc, etc.

Ran
java -Xdebug -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=n
<myClass>

When I issued this command, the program just ran without stopping. When I
then issued the command:

jdb -attach jdbconn

I got the message:

Error accessing shared memory, rc = -1
<stack trace>
Fatal error
Unable to attach to target VM

When I tried the same thing with the transport set to dt_socket, the program
did not run but I got the message:

Invalid listen port number jdbconn

When I substituted a (random) port number for jdbconn, I got the error:

Transport dtsocket failed to initialize, rc = 509

Doesn't mean a thing to me, I have to say. Does it to you?

Cheers

Peter

"Thomas Schodt" <news0310@xenoc.$DEMON.co.uk> wrote in message
news:Xns9458C38DD9355xenoc@158.152.254.254...
> "Peter Bradley" <apvx95@dsl.pipex.com> wrote in
> news:3fe5ee49$0$18034$cc9e4d1f@news.dial.pipex.com:
>
>
> > I have a problem getting the Java debugger to work under Windows XP.
> > At first I thought it was related to the NetBeans IDE, but
> > experimentation has shown that I cannot get the debugger to work in
> > NetBeans, Sun ONE, or JBuilder (haven't tried Eclipse, but I will if
> > anyone wants me to). The error message I get is:
> >
> > Transport dt_socket failed to initialize, rc = -1.
>
> Have you tried launching jdb from the command line?
>
> Lookup the options for jdb and java if you need to
> launch a java app outside the debugger
> and connect to it with jdb later.



Relevant Pages

  • jdb not working on red hat 9 linux
    ... Can't seem to get the JDB from the j2sdk 1.4.2_02 to work on Red Hat Linux ... JDB always hangs after entering the "run" command. ... $ java -classpath ./ helloworld ...
    (comp.lang.java.softwaretools)
  • JDB not working on Red Hat 9 Linux
    ... Can't seem to get the JDB from the J2SE SDK 1.4.2_02 to work on Red Hat ... JDB always hangs after entering the "run" command. ... $ java -classpath ./ helloworld ...
    (linux.redhat)
  • Command line java debugger (other than jdb)
    ... Are there any command line debuggers for Java? ... Aside from JDB, I mean. ...
    (comp.lang.java.programmer)
  • Debugging
    ... On my WinXP Professional box at home, I can't get the debugger to start from ... I get the same error using NetBeans 3.5.1, ... The command the IDE is trying to execute - shown in the output window - is ...
    (comp.lang.java.softwaretools)
  • Re: Debugging
    ... > I now get no error when I select to run in the debugger, ... The reason for this is that the IDE tries to ... >> the command executes fine and I am able to attach to this VM in my IDE ... >> Having tried to run the command and failed, NetBeans sends me to the ...
    (comp.lang.java.softwaretools)