cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Debug in Eclipse

Solved
Contributor

Cannot Debug in Eclipse

I have followed instructions from 'Mega Creating mega Plugins with java'.pdf but I am not able to debug.

 

I am attempting to setup my workspace for debugging.  I have setup my debugging options in Mega, and use the same port in Eclipse to debug. As shown in my image, the remote VM>connection is refused.

11 Replies
MEGA

Re: Cannot Debug in Eclipse

Hello SKumar

 

This error is not specific to the MEGA software.

It is related to the communication between MEGA Desktop and Eclipse on this machine --> network or configuration issue.

 

Possible causes

  • Loopback not configured (if it hosts both MEGA Desktop and Eclipse)
  • Incorrect configuration in MEGA or in Java
  • Firewall
  • ....

 

I let you check the various forums available on the subject.

Jerome
Contributor

Re: Cannot Debug in Eclipse

J

 

After performing netsta /a, I see that Mega is not listening on the port - looks like the JVM is not even started inside Mega. I tried another port - but its the same!

 

Support time?

 

-S

Contributor

Re: Cannot Debug in Eclipse

Hi,

 

Did you set the port on 1044 ? MEGA Is listening this one for sure.

 

Regards



Patrick Bobo
Contributor

Re: Cannot Debug in Eclipse

I changed it back to 1044 - but i still dont see it listed under ports that are being listened to - I can find out all ports that are being listened to by doing a netstat /a

Highlighted
Contributor

Re: Cannot Debug in Eclipse

Hi again, 

 

Sorry, I hadn't got the whole problem. The thing is that you're using Eclipse on your computer and you want it to use the debug with MEGA which is installed on the VM, right ?

If so, it's an unusual configuration. We usally install Eclipse and MEGA on the same so we can use the debug easilly. I must admit that don't know if you can use the debug in your configuration. 

 

I hope someone can help you with it, but I can't. Sorry !

 

Good luck with this.



Patrick Bobo
Contributor

Re: Cannot Debug in Eclipse

P

 

Both the Eclipse and Mega are deployed on the same VM.

 

-S

Contributor

Re: Cannot Debug in Eclipse

Oh, ok. 

 

So if you set it like on the following picture, with 1044 as address in Debugging option : 

 

Screen.PNG

 

Then in Eclipse > Debug > Debug Configurations > Remotable Java Application > New 

You create your new configuration for debugging, linked to your Java plugin. In the settings of this configuraton, you set 1044 as the port, and it should work.

 

Then, when you want to use the debug, you must have Java running in MEGA (it's not by default).

 

I hope it helps.



Patrick Bobo
Contributor

Re: Cannot Debug in Eclipse

P

 

You say I shld have Java running in mega - how do I do that? If its just the first check box from below image  (Java Debugging option), I have it running!

 

Or is there something else I need to do? I am thinking that Mega JVM needs to be started, but how do I achieve that?

 

Thanks again for all the help! I totally kudo and apprciate it!

 

-S

Contributor

Re: Cannot Debug in Eclipse

As a new intern, I'm not sure to know the official way to start the JVM, but I know one that works perfectly.

In MEGA : 

File > Export > XPDL ( last option ). Then, there's a window appearing, but you can cancel it, because this option starts the JVM, and that just what you need.

 

It's a strange way to start it, but it works and for the moment I don't know another one.

 

No problem about the help, that's the purpose of this forum Smiley Wink



Patrick Bobo