简体   繁体   English

如何在Eclipse中调试乐山代码

[英]How to debug Leshan Code in Eclipse

I am referring to Leshan Code Leshan Server . 我指的是乐山代码乐山服务器 I have successfully downloaded, Compiled and even built JAR file using maven command line. 我已经使用maven命令行成功下载,编译甚至构建了JAR文件。

I have followed all the steps but i am unable to make the code run from Eclipse. 我已经遵循了所有步骤,但我无法使代码从Eclipse运行。 I am unable to find which option should i choose in "Run As" menu of Eclipse so as to make .jar binary from Leshan code via Eclipse. 我无法在Eclipse的“Run As”菜单中找到我应该选择哪个选项,以便通过Eclipse从Leshan代码生成.jar二进制文件。

The Jar Binary gets created if i use the steps mentioned in above URL via command line, but i want to debug the same code via Eclipse. 如果我通过命令行使用上述URL中提到的步骤,则会创建Jar二进制文件,但我想通过Eclipse调试相同的代码。

Can any one please help me how can i do this? 任何人都可以帮助我,我该怎么做?

You first need to import the Leshan projects using the "Import Existing Maven Projects" wizard. 首先需要使用“导入现有Maven项目”向导导入乐山项目。

导入现有的Maven项目

Select the location where you have cloned Leshan locally (you may also want to do the repository cloning right from Eclipse using EGit) 选择您在本地克隆乐山的位置(您可能还希望使用EGit从Eclipse进行存储库克隆)

选择乐山项目的位置

Once the projects are imported (the Maven plug-in may complain about a missing "replacer" plug-in but that won't prevent you from debugging), the entry point to launch the Leshan server is the Leshan standalone class. 一旦项目被导入(Maven插件可能会抱怨缺少“替换器”插件,但这不会阻止您进行调试),启动乐山服务器的入口点是乐山独立类。

调试乐山

You now have Leshan running at http://localhost:8080 and you can debug it! 你现在让乐山在http:// localhost:8080上运行 ,你可以调试它!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM