manish
manish

Reputation: 974

How to attach source code for debugging in jar intellij?

I wanted to add source code to my custom jar.

I tried adding "src" folder to jar by selecting

** File->Project Structure->Artifect->output layout->"+"**

. But It did not work for me.

I even tried adding "src" folder by clicking "CTRL+click"->Attach source. It says attaching but nothing happens.

Is there any way to add source code while creation of jar?

I am using Intelij-Idea 14.1.4

Upvotes: 1

Views: 2987

Answers (2)

manish
manish

Reputation: 974

There was a bug in Android studio 1.2 because of that source attachment was not working. It is fixed in 1.3. For go to this link https://code.google.com/p/android/issues/detail?id=181416

To fix this update your Android Studio

Upvotes: 1

einworB
einworB

Reputation: 33

Have a look at jdc0589s answer here.

Click the '+' button in the 'output layout' tab -> include directory contents -> select your src directory.

Does this solve your problem?

Upvotes: 0

Related Questions