eclipse debugger: attaching source-code of maven dependencies?

前端 未结 4 1154
时光取名叫无心
时光取名叫无心 2021-02-01 20:48

I\'d like to use the source code of maven-managed dependencies when debugging our webapp in myEclipse 8.

I have managed to attach the sources to the libraries in the \"M

相关标签:
4条回答
  • 2021-02-01 21:17

    Looks like issue MNGECLIPSE-983

    I have confirmed that if I manually pick the External Archive option and find the relevant -sources jar (navigating that big .m2/repository tree to find it) and then add the jar as a sources it does work, and surprisingly it does remember the next time which isn't too bad.
    That's at least doable I think for me because we don't often need to step debug through external dependencies, but when we do, it's often frequent, so adding it once while a bit of a pain, can be done on a case by case basis.

    0 讨论(0)
  • 2021-02-01 21:30

    I have since discovered that this problem only occurs if the server is launched using a launch configuration.

    The problem does not occur if the server is started by:

    1. click the server icon in the toolbar -> context menu appears
    2. mouse over the intended server -> submenu appears
    3. click on "Start"

    While this precludes sharing the server configuration by checking the launch configuration into version control, it at least allows seamless debugging.

    0 讨论(0)
  • 2021-02-01 21:30

    Please do the following steps in Eclipse IDE(Tested with Version: 3.5.2),

    1. In Package Explorer, Right Click on the Project which integrated with Maven container.
    2. Select Maven 2 and then select "Fetch Source JARs". The above action wil fetch sources of all the 3rd party jars present in the Maven Classpath.

    Regards, Rajesh.

    0 讨论(0)
  • 2021-02-01 21:32

    Just put the .m2/repository/ folder itself with the search subfolders option.

    0 讨论(0)
提交回复
热议问题