Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Why isn't debugging easier? Where's the source code?

Avatar

Avatar
Validate 10
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

97 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

97 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
jkpanera
Level 3

12-08-2019

I am a very experienced Java developer who has been learning AEM for the last year. One of the things that makes me crazy is that it's so hard to debug.

In theory most of AEM is open source. In practice, it isn't.

Inevitably, I'm going to want to debug my application, but Adobe has gone out of its way to make that difficult. I can't just download a source jar with my IDE and set a break point (as was possible when using most other frameworks). When I do download a source jar Sling/Jackrabbit, whatever, inevitably, the source doesn't match.

Why doesn't Adobe choose release versions of the frameworks that it uses?

It's horribly frustrating. I understand that you  are selling so VPs not developers, but you aren't making friends by doing this.

I don't think I would recommend that anyone use AEM.

Replies

Avatar

Avatar
Give Back 5
Employee
Andrew_Khoury
Employee

Likes

75 likes

Total Posts

93 posts

Correct Reply

33 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
Andrew_Khoury
Employee

Likes

75 likes

Total Posts

93 posts

Correct Reply

33 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
Andrew_Khoury
Employee

12-08-2019

Hi jkpanera​,

You should be able to do debugging using remote debugging as documented here:

Debug an AEM app using eclipse

Remote debugging is available in all major Java IDE's.  Using remote debugging, you can debug your application's code.

In addition, the code for Apache Felix, Sling and Jackrabbit Oak is available on github: The Apache Software Foundation · GitHub​.

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

12-08-2019

Can you give an example where the problem arises, that a sling or Jackrabbit bundle you downloaded does not match the code?

Also the AEM uber jar only references the API bundle versions, and does not specify the version number of the implementation bundles. This is by design. If you really want and need to debug into the implementation bundles you probably have specify them in your POM as well, just to pinpoint to the correct version.

And to be honest, I was not aware of the problem you describe. Either other developers solve it for themselves and never talk about it, or it's not a problem at all for them (and then I don't know why). Maybe others can elaborate a bit on this, because I don't debug into the live system.

Jörg

Avatar

Avatar
Validate 25
MVP
Himanshu_Singhal
MVP

Likes

65 likes

Total Posts

206 posts

Correct Reply

23 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 25
MVP
Himanshu_Singhal
MVP

Likes

65 likes

Total Posts

206 posts

Correct Reply

23 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
Himanshu_Singhal
MVP

12-08-2019

And, IntelliJ provides Remote debugging in a quite good way where you can set debug point in compiled classes as well without installing any source code compiler in IDE.

Avatar

Avatar
Validate 1
Level 2
software_engineer
Level 2

Likes

8 likes

Total Posts

19 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
Level 2
software_engineer
Level 2

Likes

8 likes

Total Posts

19 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
software_engineer
Level 2

03-03-2021

Hi @jkpanera, I read your question and the replies of the Adobe employees here. I see that none of the replies here is an accepted solution to your question, though it's an old question and I see that you are still active in this community. Did you find a solution? 

By the way, I have added a question regarding my problems here: Why the "uber-jar-6.5.5-sources.jar" does not contain the source code of all open source libraries a... 

Avatar

Avatar
Validate 10
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

97 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

97 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
jkpanera
Level 3

06-05-2021

Here's an example:

 

I have this HTL:

 

<sly data-sly-use.model="com.panerabread.core.models.ui.forms.TextField"></sly>
<sly data-sly-test.isTextArea="${model.type == 'textArea'}"></sly>
<sly data-sly-test.id="${model.id}"></sly>
<div class="pds-field ${isTextArea ? 'pds-input-field pds-textarea-field' : 'pds-input-field'}">
<input data-sly-test="${!isTextArea}"
type="${model.type}"
id="${id}"
class="pds-input"
name="${model.name}"
placeholder="${model.placeHolder}"
autofocus/>
<textarea data-sly-test="${isTextArea}"
id="${id}"
placeholder="${model.placeHolder}"
class="pds-input pds-textarea pds-textarea-transparent"
name="${model.name}">
</textarea>
<label class="pds-label"
for="${id}">
${model.label}
</label>
<!--/* Hint section. */-->
<div data-sly-test="${model.hintText}" class="pds-field-hint">
<!--/* Error handling for the invalid text input. */-->
<p class="pds-field-hint-text">
<span> ${model.hintText} </span>
<!--/* TODO Handle validations */-->
<!--/* <span> ${model.preparedForInvalidCharactersError} </span> */-->
<sly data-sly-list.valiation="${model.validations}">
${valiation.constraint}
${valiation.message}
</sly>
</p>
</div>
</div>



I can stop in the debugger and see that the name field is as expected "name"

 

Screen Shot 2021-05-06 at 16.18.59.png

 

But this is the content that's generated:

 

It's this:

 

Screen Shot 2021-05-06 at 16.22.08.png

For some reason, it inserts the name of the content package rather than the name in the component.

 

Something in sling is changing it and I can't debug into the generated code.