Attach Source Code to Library

Dear Forum,

I just loaded the last version of the MicroEJ SDK from the new developer.microej.com web site. I used the https://developer.microej.com/get-started-app-development-on-espressif-esp32-wroverkit-v41/ script to start with this discovery journey of MicroEJ 5.1.
While I started to debug the application, I came across a “Attach Source Code” to your library message within the debugger.

My configuration is simple, as I am working on only one VEE platform at a time.
From the main menu Windows>Preferences>MicroEJ>Virtual Devices>VDE-BLACK-ESP32WROVER-RQQAW , after pressing F2 key, I could see the path of my installed VEE Virtual Device.
[my path].microej\repositories\MicroEJ-SDK-19.05\1.6\vd001

How can I attached the source code to the libraries that are in my project (located in ivy directory of my project), so that I can browse the code and follow the symbolic debug flow ?

Looking forward to reading you
John

Hi @JohnGardyne,

There are different place to find the source code and class files:

  • The source code for the addon library is automatically fetched from ivy.
  • For the foundations libraries you can use the jar that are located at [platform path]/javaLibs/[foundation library]-[version].jar
  • For the libraries provided by the firmware you can use the jar that are located at [platform path]\firmware\javaLibs
  • For the applications embedded in the firmware you can use the jar that are located at [platform path]\firmware\applications\systemapp\

Regards,

Pierre

Hi Pierre,

Thanks for your helpful feedback. Next are the steps that I have done, and all went perfectly:

1/ I have copied the path of my VEE platform, which was accessible from de SDK menu:
Windows->Preferences->MicroEJ->…select VEE platform (virtual device)…-> …once the popup has shown… I pressed F2 key->…then I have copied the patch:

I my example, as I had only one VEE loaded (the one from the Getting Started web page), it appears as :

C:\Users\John\.microej\repositories\MicroEJ-SDK-19.05\1.6\vd001

2/ Then I did open the Ivy folder, the one with little icon that materializes a pile of books.
I proceeded with your other steps.

3/ Right-clicked on the foundation libraries one by one to attached their source code

4/Then I selected Properties -> Java source attachment

5/Then I selected the External Location option, then browsed the file system, and found

C:\Users\John\.microej\repositories\MicroEJ-SDK-19.05\1.6\vd001\javaLibs\bon-1.4.jar

Finally, I applied and close the wizard. And I could now easily debug the library too.
Thanks for your help.

Regards,