While building an agent, it can be very useful to get your agent loaded using an actual debugger. Here are some links and instructions for making that happen in a few different IDEs. I've copied this information over from an old wiki page, so that it could be kept up-to-date easier.
XCode: see this forum thread
Eclipse: see this forum thread
Create a new project
In the project properties, Sources, add the LuxSDK/src folder to the Source Package Folders
In the project properties, Libraries, compile tab, add LuxCore.jar if you are on Windows. In OSX, create an alias to /Applications/Lux.app/Contents/Resources/java/ and use it to add MRJAdapter.jar and LuxCore.jar
In the project properties, Run, set main class as com.sillysoft.lux.Lux, and set the Working Directory as the Lux folder (where you found LuxCore.jar)
From the main interface, project (or files) tab, select the src directory, drill down to com/sillysoft/lux/agent, create a new empty java file and copy another bot (like Angry.java) into it
From the build menu, Build the main project (F11)
If you want, set breakPoints in your source (click to the left of any line), and from the Run menu, Debug Main Project (F5).
IntelliJ IDEA using remote debugging (JPDA):
Add these line to the Info.plist file within Lux.app/Contents:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
Then create a run configuration that uses the default remote settings and make sure your agent class compiles to the Library dir where it should go normally. Then run Lux normally (separately), and debug in IDEA. You can set breakpoints that intercept normal Lux action.
AI discussion, ideas, and SDK help.
1 post • Page 1 of 1