gpt4 book ai didi

java - 在 IntelliJ Idea 中查看使用的 Java 类的源代码

转载 作者:搜寻专家 更新时间:2023-10-30 21:46:11 24 4
gpt4 key购买 nike

在 visual studio 开发环境中,当您使用库时,如果您有相关的 pdb,您可以在调试期间深入了解它们的源代码。请问有没有什么办法可以在Java下用IntelliJ Idea IDE开发时有这个功能呢?我想看看 hibernate 做了什么。

最佳答案

当然,引用documentation :

Libraries may optionally include the source code for the library classes as well as corresponding API documentation. [...] However, it adds the ability to use inline documentation extracted from the source code, and also to view the API documentation right from the IDE.

文档没有提到你可以调试外部库,这显然也是可能的。

为了添加源选择:

  • 文件 |项目结构
  • 点击库选项卡
  • 选择库并点击 + 图标
  • 找到包含源代码的 JAR 文件。

如果您正在使用类似 的构建工具, IntelliJ 将自动下载可用源并将其附加到所有库,无需手动操作。

关于java - 在 IntelliJ Idea 中查看使用的 Java 类的源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10781135/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com