Troubleshooting local Thingsboard backend debugging

Hey everyone,

I’m having a hard time getting the Thingsboard backend to run on my computer for debugging. I’ve tried following the contribution guide and managed to build from source on Ubuntu 20.04, but that’s as far as I got.

I’m using Eclipse and imported the project as a Maven project. But now I’m stuck. How do I actually debug the backend locally? Has anyone done this before?

Any tips or steps would be really helpful. I’m not sure if I’m missing something obvious or if there’s a specific setup needed for debugging.

Thanks in advance for any help!

Debugging the Thingsboard backend locally can indeed be tricky. One crucial step I found helpful was ensuring all dependencies were correctly set up in the pom.xml file. It’s also worth verifying that your Java version matches the project requirements.

Another key aspect is configuring the database. I recommend using an H2 in-memory database for local debugging, as it simplifies the setup process. You’ll need to adjust your application.properties file accordingly.

Lastly, don’t forget to set breakpoints in your code where you want the debugger to pause. This allows you to step through the code execution and inspect variables, which is invaluable for understanding the system’s behavior and identifying issues.

hey max, i’ve done this before. make sure u’ve set up the right run configuration in eclipse. u need to specify the main class (org.thingsboard.server.ThingsboardServerApplication) and add VM args like -Dspring.profiles.active=development

also, double-check ur application.yml file. good luck!

hey max! have u tried using IntelliJ IDEA instead? it’s got awesome Java debugging features. also, make sure ur JAVA_HOME is set correctly. oh, and don’t forget to enable remote debugging in ur VM options! (-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005)

what part of the backend are u most interested in debugging?