What debugging tool works for URCaps?

Hello everyone. I’ve written a very simple URCap that should basically just display the HTML I wrote. Maven compiles it without any issues, but when I try to add it in PolyScope, it shows up with a warning triangle and won’t run. I believe my basic syntax is fine, so I have no idea what the issue actually is. And the built in help telling me to contact the URCap developer is of very little help, since that guy is exactly as clueless as me. Since he is me…
Anyway, my question is this: What debugging tool can I use to find the problem with my URCap?
Running Maven with the -X option is no help to me, though it may just be that I don’t know what to look for since I’m not that experienced with Java. I know that if I could get the URCap to acutally run, I can use the logger or the terminal to debug functionality, as seen here:

Printf - like debugging in URCaps or any alternative?!

Image showing the error:

Hi! One possible answer is already given in your linked post.
Just start the URSim environment via the terminal ( ./ursim-current/start-ursim.sh ).
Then more data is displayed in there.

If you want to add your own output messages, you can use System.out.println() in your java-code.
This will then also be shown in the console.

I see it now. Thanks. It gave me the error during startup - I was trying to use unsupported HTML-keywords. I just wasn’t looking at the lines in the terminal before actually starting the simulator, because I didn’t realize it would initialize the URCap then. My bad. The System.out.println() gave me nothing though, since the code never actually seemed to run due to the other error. Might be I should have put the line in the Service module, not the contribution. I’ll do that next time.
I changed my HTML now, though I didn’t catch all the bad keywords the first time around, and I’ve made it so much worse. Now, when I run ./start-ursim.sh the programme loads to 100% and then gets stuck.
I tried doing a reinstall by deleting the files I directly unpacked from the tar, but it seems to have saved some configuration somewhere else, because downloading and unpacking the tar anew did not cause it to stop trying to load my URCap. Downloading and unpacking a different version of URSim did though. Any idea where it may have saved this configuration? I’m running it on native Ubuntu.

Renaming the folder after unpacking solved the issue. But even after that, changing the name back to the original re-introduces the error. I find that quite strange.

Hi Krededige,

You can debug your URCap remotely from an IDE. Below mentioned link may help you.

1 Like