Closed unical1988 closed 1 year ago
I would like to debug ARX code using Eclipse. How do I have to proceed to do so?
This is also a good tutorial about debugging in eclipse.
@prasser As suggested by the video here https://drive.google.com/file/d/11lFZk71YCDAIUUPjwAObhrOfC93V6w-D/view, it does not, I can't find the run as an application for the src/main/gui/Main.java file
it does not, I can't find the run as an application for the src/main/gui/Main.java file
Can you show what does not work? screenshots and/or videos of your steps would be helpful.
@idhamari when I right click on the Main.java in the gui folder (org.de-indentifier.arx.gui) as the highlighted video shows, the list doesn't contain the option "run as an application" but just "run configuration". It must be a project setup problem, that I can't figure out anyway.
@unical1988 can you make sure that your eclipse and java were installed correctly e.g. by trying to create any simple java project then compile it and run it in eclipse?
@idhamari sure eclipse works ok.
Then it's likely that your project setup is not correct. Have you followed the steps described at the link exactly? Maybe delete the project and start again following the instructions?
Given as mentioned that the run as application option is not offered when I right-click the Main.java in the GUI folder (in order to execute ARX), I set the run configurations "goal" to be equal to exec:java
.
But then when I run that configuration I get the following error:
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java are missing or invalid
Which I tried to solve using:
<mainClass>${project.basedir}/src/gui/Main</mainClass>
Inside
<plugin>
<groupId>org.codehaus.mojo</groupId>
...
<configuration>
<!-- I specify the location of the main class here-->
...
</configuration>
</plugin>
But still get the same error as before doing this.
You should not use Maven. Per default, ARX runs in Eclipse without Maven und the binaries are built using Ant (but you don't need to run Ant to be able to compile / debug ARX in Eclipse). As I said, something seems to be wrong with your project. It is, for example, important to not create a Maven project, but a Java project and to not add the Maven nature. Create a simple Java project following the steps in the tutorial linked above.
I deleted and imported the project again as Java application, and it worked, I am able to open the GUI and debug the software. Now, if I have implementation inquiries (e.g., about the role of some method or a class in the code), how/where could I ask them?
Great. Will close this now.
I would like to debug ARX code using Eclipse. How do I have to proceed to do so?