Way to allow eclipse to trace within lejos source

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

Way to allow eclipse to trace within lejos source

Postby pipedream » Sat Aug 09, 2014 1:57 pm

Hey everyone,

I'm still pretty new to eclipse and lejos, please help me with this newbie question. Tried searching the forum but didn't find anything quite related.

I want to be able to debug within the lejos source code. My current running environment is within eclipse, I created my project and linked the lejos library using the plugin. I ran as ordinary java application instead of the lejos ev3 program because I want it to be centered at my computer and treated ev3 as a remote portal for sensor/motor. The program give error in some initialization with lejos library, that's why I'm asking this question. I tried creating a package and copying all the src from lejos in the project but it is still unable to generate debug stack. The setting in eclipse is also checked to generate debug info.

As a side note, the sensors I'm using seemed to be working fine when the program was running locally (ran as lejos ev3 program) but give null pointer error when executed remotely as ordinary java application. Still trying to figure out why this is happening and what might the cause be.

Any help is appreciated!
pipedream
New User
 
Posts: 9
Joined: Sat Aug 02, 2014 7:46 pm

Re: Way to allow eclipse to trace within lejos source

Postby pipedream » Mon Aug 11, 2014 1:43 am

Source trace issue resolved now.
pipedream
New User
 
Posts: 9
Joined: Sat Aug 02, 2014 7:46 pm

Re: Way to allow eclipse to trace within lejos source

Postby gloomyandy » Mon Aug 11, 2014 9:03 am

Hi,
glad you got it sorted. Could you post what you did to resolve the issue in case other users have the same problems.

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4084
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Way to allow eclipse to trace within lejos source

Postby pipedream » Mon Aug 11, 2014 9:10 am

Okay, I found the source of the lejos package somewhere from the internet, and then I created/imported packages of everything as provided in the lejos-ev3 source including those cx and org packages in my project. I also removed the lejos runtime library in the package to make sure it worked properly.
pipedream
New User
 
Posts: 9
Joined: Sat Aug 02, 2014 7:46 pm

Re: Way to allow eclipse to trace within lejos source

Postby skoehler » Mon Aug 11, 2014 9:39 am

What do you mean by "I found the sources somewhere" ?
I just looked into the win32 ZIP download (and I assume the Windows installer contains the same files), and almost every *.jar is accompanied by a corresponding *-src.zip.
Also, if you were using the leJOS EV3 Eclipse plugin, this source ZIP archive should already be configured for you so that Eclipse automatically finds and opens the source for every leJOS class when needed.

That said, I don't really understand your issue. Are you seeing incomplete exception stack traces? Or are you trying to remote debug on the EV3 and Eclipse cannot find the sources?
Can you describe more closely what you are seeing and what you are expecting?
skoehler
leJOS Team Member
 
Posts: 1422
Joined: Thu Oct 30, 2008 4:54 pm

Re: Way to allow eclipse to trace within lejos source

Postby skoehler » Mon Aug 11, 2014 11:55 am

OK, I think I found the problem you are talking about. Setting a breakpoint in RemoteEV3's constructor for example brings up an error message saying that the class doesn't have debug information enabled. Apparently we forgot to enable debug information.
skoehler
leJOS Team Member
 
Posts: 1422
Joined: Thu Oct 30, 2008 4:54 pm


Return to EV3 Software

Who is online

Users browsing this forum: rickshoe, Yahoo [Bot] and 1 guest

more stuff