Debugging
From: Peter Bradley (apvx95_at_dsl.pipex.com)
Date: 02/18/04
- Previous message: Martin Zúber: "Re: SunOne Studio on Linux"
- Next in thread: Peter Bradley: "Re: Debugging"
- Reply: Peter Bradley: "Re: Debugging"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 18 Feb 2004 19:37:23 -0000
Hi everyone,
I've posted about this before, and had some help, but have unfortunately not
been able to solve the problem. I have a little more info now, so perhaps
we might have more luck this time.
On my WinXP Professional box at home, I can't get the debugger to start from
within any of my IDEs. The reason for this is that the IDE tries to use a
socket transport. Now there is no reason for it to do this, and I can't see
where I can change it. I get the same error using NetBeans 3.5.1, NetBeans
3.6 Beta, Borland JBuilder, and Eclipse. I do not get the error if I boot
into my Linux partition on the same box, nor do I get the error on my W2K
Server box at work.
On my last attempt, I did look in the knowledge base which talked about
using a J2sdk path with no spaces in it. As you can see below, the path has
no spaces. Also NetBeans 3.5.1 is installed at:
C:\j2sdk_nb\netbeans3.5.1\bin\runidew.exe
Also with no spaces.
I'll concentrate on the info I can glean from NetBeans 3.5.1, but you can
rest assured that it is the same for all the others as well.
When I try to run in the debugger, I get (after a long pause) the following
error message:
Exception while starting debugger:
Cannot start process C:\j2sdk_nb\j2sdk1.4.2\bin\java.
java.io.IOException: VM initialization failed
The command the IDE is trying to execute - shown in the output window - is
(with the bulk of the classpath cut out to save space):
C:\j2sdk_nb\j2sdk1.4.2\bin\java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_soc
ket,address=cymro-ffenestri:1114,suspend=y -Djava.compiler=NONE -classpath
"--- classpath goes in here ---" <package_name>.<class_name>
The error message returned in the output window is:
err:: No such file or directory
Error [2] in connect() call!
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1.
Now, if I open a command window and do:
C:\j2sdk_nb\j2sdk1.4.2\bin\java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_shm
em,address=jdbconn,server=y,suspend=y -Djava.compiler=NONE -classpath "---
same classpath as above ---" <package_name>.<class_name>
the command executes fine and I am able to attach to this VM in my IDE and
use the debugger. Which is a workaround of sorts, but less than
satisfactory (in my opinion).
Having tried to run the command and failed, NetBeans sends me to the
configuration dialog for the debugger, where it tells me that the command it
is trying to execute is:
{jdk.home}{/}bin{/}java
The arguments being passed are:
{classic}{assertEnabled}{debuggerOptions} -Djava.compiler=NONE -classpath
{q}{filesystems}{q} {main}
Both {classic} and {assertEnabled} are false. I can't find any way to
configure the other options. So the next thing I tried was to replace, in
the configuration dialog, the {debuggerOptions} placeholder (or whatever it
is) with the actual values I know work from the command line, i.e.:
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,susp
end=y
This causes the IDE to hang. It won't even refresh the screen. Dead.
So, that's the history.
If anyone can throw any light on this, or help in any way I'd be most
grateful.
Thanks in advance
Peter
- Previous message: Martin Zúber: "Re: SunOne Studio on Linux"
- Next in thread: Peter Bradley: "Re: Debugging"
- Reply: Peter Bradley: "Re: Debugging"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|