Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

re-attach sources in intellij?

Tags:

I'm hoping to debug into the source code of jaxb-impl.

I downloaded version 2.2.6, attached the sources and then realized the app I'm debugging is using jaxb-impl version 2.2.3

So now that I have the correct version 2.2.3 of the source, I can't figure out how to remove the association from 2.2.6 source so that I can attach the 2.2.3?

Update: I figured out that you can go into the .idea directory, find the library xml def and remove all the stuff inside the <sources> tag. In my case, I edited libraries/Maven__com_sun_xml_bind_jaxb_impl_2_2_3_1.xml.

Anyone know if there's a way to do this thru the GUI?

like image 241
Upgradingdave Avatar asked Oct 30 '12 17:10

Upgradingdave


People also ask

How to Attach source in IntelliJ?

zip to IntelliJ IDEA. 2.2 Platform Settings -> SDKs -> Select Sourcepath -> plus icon -> select src. zip from the JDK installed path. 2.3 Done.

How do you attach a debugger to a process in IntelliJ?

Press Ctrl+Alt+F5 or choose Run | Attach to Process from the main menu. IntelliJ IDEA will show the list of the running local processes. Select the process to attach to. The processes launched with the debug agent are shown under Java.


2 Answers

Project Structure | Libraries (or Module Dependencies if libraries are defined there):

sources

In case Maven is managing the dependencies, Download Sources in the Maven Projects should also work:

download

like image 194
CrazyCoder Avatar answered Sep 18 '22 13:09

CrazyCoder


Another (non-GUI) option is to delete the downloaded source files from $USER_HOME$/.ideaLibSources/ and restart IntelliJ. I'm working on a Grails project and didn't see anything relevant in the GUI.

like image 31
Ed Norris Avatar answered Sep 17 '22 13:09

Ed Norris