Cannot connect to VM error in Java debugger [message #247170] |
Fri, 31 August 2007 16:20  |
Eclipse User |
|
|
|
Originally posted by: billmcn.gmail.com
I am running Eclipse 3.2 on Ubuntu 7.04. I created a simple hello world
Java program by following the steps in the Eclipse HelloWorld tutorial.
The program builds and runs. When I try to debug it, I get a "Cannot
connect to VM" error. I see multiple mentions of this error on various
newsgroups, but it's not clear to me if the suggestions I've seen apply to
my machine.
Here are the details:
1) After verifying my program works without the debugger, I put a
breakpoint on the println statement in the main function.
2) From the Eclipse menu, I select Run->Debug... and press the Debug
button on the dialog that appears.
3) "Hello, World" is printed to the console immediately.
4) Several seconds later I see a dialog box entitled "Launching" with the
error message "Cannot connect to VM". This dialog has a Details button
that is grayed out.
I see the same behavior if I don't set a breakpoint in step (1).
This is a local debugging task. I'm not trying to debug anything
remotely. I also have localhost set up in my /etc/hosts file, and
networking is set up properly.
I find this particularly confusing because steps (3) and (4) make it seem
like a regular non-debugged process is being launched, and the debugger
fails to connect because it has already closed.
Any suggestions?
|
|
|
|
|
|
Re: Cannot connect to VM error in Java debugger [message #247721 is a reply to message #247540] |
Mon, 10 September 2007 10:42  |
Eclipse User |
|
|
|
Can you try Eclipse 3.3 to see if the problem still exists?
Darin
"Bill McNeill" <billmcn@gmail.com> wrote in message
news:1edb64dba692b7e2988b989164b71204$1@www.eclipse.org...
>I don't have the firewall enabled. Ubuntu has the firewall turned off by
>default and I am using a default Ubuntu setup.
>
> After a bit more poking around I managed to fix this problem. I don't
> remember exactly what I did because I was randomly trying stuff, but I
> think the crux of it was that I deleted my workspace folder and started
> over. Not satisfying since I don't understand what was originally wrong,
> but at least the debugger works now.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.24956 seconds