-
Notifications
You must be signed in to change notification settings - Fork 113
How to load the aion project and debug the kernel on IntelliJ IDEA
AionJayT edited this page Mar 10, 2020
·
2 revisions
The aion Java kernel use gradle as the repo build system. You should be able to load the project with the IDE support the gradle build tool. For example, IntelliJ IDEA, Eclipse for java
After installed the IntelliJ IDEA and download the aion repo from the github(See Build Aion kernel from source). You can load the project by the following steps:
- Click the File tab -> New -> Project from the existing sources
- Select the aion repo folder -> Click OK
- Select Import project from external model -> Select Gradle -> Click Finish
- You might be asked to open new window or use existing window if you have other IntelliJ IDEA project
- The IDE will run sync tasks for fetching all the project dependency
- Click the Project tab -> Click the module modBoot under the module aion
- Click src[main] -> Right Click the Aion under the package org.aion
- Click Run Aion.main() or Debug Aion.main()
Note: you will need to set the argument input in the main method to clean up the gradle argument input, i.e. Add args = new String[0] in the first line of the main method.
Before debugging the remote node, you need to run a Java node with the remote debugging enabled.
- Find your remote Java node executing folder, use editor to open the aion.sh file
- Add debug option after line 56 and then save the file
JAVA_OPTS+=" -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
- Execute the remote node using
LD_LIBRARY_PATH=$JAVA_HOME/lib ./aion.sh -n <network name>
- Setup the break-point you want to debug the aion kernel
- Click Run tag on the IDE -> Select Attach to Process... -> Click the remote running aion proccess You should be able to debug the aion kernel
Basics
Kernel Configuration
- Build Aion kernel from source
- Installation & Configuration
- Command Line Interface
- Graphical Interface
- Database
- Internal Miner
- Genesis Block
- Aion Seed Nodes
- JSON-RPC API Docs
For Developers
- How to load/debug project to IntelliJ IDEA
- Aion Code Conventions
- Migrating from Ethereum
- Precompiled contract details
- Troubleshooting the kernel
- Aion P2p Specifications
- Aion transaction Specifications
- Aion pending state and the transaction pool
Tutorials
- Importing Accounts
- Kernel Deployment Examples
- Reverting to Previous Blocks
- Application Development
- Enabling-HTTPS-for-JSONRPC
- Enabling Secure connection for Aion Java API
Modules