Rookout tutorial for debugging Java applications
A sample app for debugging Java using Rookout.
- Java 8
- Docker (optional) - https://www.docker.com/get-docker
- Clone the sample app from this repository:
git clone https://github.com/Rookout/tutorial-java.git cd tutorial-java
- Set your Rookout Token as an environment variable (for Windows, use set instead of ***export)
export ROOKOUT_TOKEN=[Your Rookout Token]
- Build and run the app
Build and run the app using Gradle:
./gradlew bootJar run
- Optional - Run the app using docker (Java & Gradle are not required)
docker run -p 8080:8080 -e "ROOKOUT_TOKEN=[Your Rookout Token]" rookout/tutorial-java
Log in to the Rookout IDE.
Add the source code according to the instructions using the left pane Source View
Adding source code
- Click on Add source
- Choose source control
- Click on Connect
- Authorize O-Auth
Repositoryand choose from the dropdown menu
- Click Next
- Choose the desired branch
- Click View Repository
- Local FileSystem - Server
- Click on Setup Server
- Choose a supported HTTP Server
- Follow the on-screen instructions
- If this is not the case, check our troubleshooting guide
Go the the app page - http://localhost:8080/ and add try to add a task to the todo list
- Check the bottom pane Messages and you'll see the dumpframe you just added - it was triggered by the handler of the web page when you accessed it!
- Breakpoint status is RED -- Hash mismatch. It means the file used in the server is not the same file used from github/local server in app.rookout.com
- Breakpoint status is GRAY -- No app connected. Make sure you have inserted the Rookout Token in the right place and that connection is made properly.
Great! You're now ready to start debugging, let's start by having some fun with our bug hunt - follow the instructions to try out some basic use cases.
Want to learn more ?
- Our documentation for more information
- our deployment examples for platform-specific integration examples