调试 Eclipse 上游插件

发布于 2024-11-29 03:01:59 字数 308 浏览 1 评论 0原文

我从 CVS 获取了 Eclipse 上游插件的源代码(即由 Eclipse Foundation 提供),并将其中一个导入到 Eclipse PDE(在本例中为 org.eclipse.core.runtime)。这确实成功了,因为来源拥有偏微分方程所需的元数据。我放置了几个断点,并尝试通过调试从 IDE 启动它,假设这将启动 IDE 的新副本,以便新构建的插件将替换原本加载的任何内容。这样我就可以调试 Eclipse 内部结构。然而,事实并非如此。构建插件实际上失败了,并出现了数千个错误。 那么,Eclipse 源代码应该可以通过这种方式构建吗?如果有更好的方法来做到这一点,我愿意接受想法。

I got the source for Eclipse upstream plugins (that is, provided by the Eclipse Foundation) from the CVS and imported one of them to Eclipse PDE (in this case, org.eclipse.core.runtime). That did succeed, since the sources have the necessary metadata for PDE. I placed a few breakpoints and tried to launch it from the IDE with debugging, supposing that this would launch a new copy of an IDE so that the newly-built plugin would replace whatever would otherwise be loaded. This way I could debug Eclipse internals. However, it did not turn out this way. Building the plugin actually failed with literally thousands of errors.
So, should Eclipse source be buildable in this way? If there is a better way to do this, I am open to ideas.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱,才寂寞 2024-12-06 03:02:00

你是对的,预计你签出该插件并能够立即开始破解它并启动新版本......有一个要求:你的目标平台必须与插件的版本匹配。因此,如果您查看了最新版本,则需要将最近的夜间或集成构建设置为目标平台。如果插件来自旧版本(例如 3.6 或 3.5),您需要设置相应的版本。

设置目标平台的最简单方法是下载相应的版本,将其解压到某个位置,然后将安装添加到目标平台中(Window -> Preferences -> Plug-in Development -> Target Platform)。 提示:将其添加为安装位置。

You are right, it is expected that you checkout the plugin and be able to start hacking on it immediately and launch the new version... with one requirement: your target platform must match the the plugin's version. So, if you checked out the latest version, you need to have very recent nightly or integration build set up as Target Platform. If the plugin is from an older version (say 3.6 or 3.5), you'll need to set up the respective version.

The easiest way to setup your target platform is to download the corresponding build, extract it somewhere and then add the installation in the target platform (Window -> Preferences -> Plug-in Development -> Target Platform). Hint: add it as Installation location.

り繁华旳梦境 2024-12-06 03:02:00

如果您有一个基于从 Eclipse 启动的平台的产品,并且想要在平台代码中设置断点,那么最好安装 Eclipse SDK。

帮助->安装新软件 ->选择 Eclipse 项目更新站点。选择 Eclipse SDK。这包括该平台的源包。

您可以通过按住 Ctrl 键单击要调试的类并查找相关位置来设置断点,也可以按 Ctrl-Shift-T 直接打开类型。

如果您只是平台的下游消费者,这比尝试使版本匹配要容易得多。

If you have a product based off the platform that you are launching from Eclipse, and you want to set breakpoints in platform code, you may be better off installing the Eclipse SDK.

Help -> Install New Software -> Pick the Eclipse Project Updates site. Choose the Eclipse SDK. This includes the source bundles for the platform.

You can either set a breakpoint by just Ctrl-Click'ing on the class that you want to debug and looking for the relevant spot, or Ctrl-Shift-T to open the type directly.

If you're just a downstream consumer of the platform, this is much easier than trying to get the versions to match.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文