Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Debugging?

Featured Replies

Hi folks, I pulled down an open source AIO script and am looking to make modifications and additions as a learning process...

With that said, how are folks debugging their scripts? JUnit testing or just loading them up in the client and trying to pick apart the logs?

 

Also if I have a rather complicated script, should I be exporting it as a JAR and importing that JAR as a script, or is the a more streamlined build process?

I personally try and make functions as independent as possible so that I can create mini utilities in my script to test out individual methods, like this

image.png.ffc7f9f692f8c36e333169df86622da7.png

Short of that, the logger is your friend, and you should use it frequently to pick apart the brain of your script.

I use the actual debugger as a last resort. You can connect it by starting the client with -debug 5005 arguments, and attaching your IDE to the remote process. I use it as a last resort because it tends to error out on me after a few reloads of the script, and I have to restart the client again.

I export JARs straight to my OSBot scripts directory. My IDE complains about overwriting files, but it works anyways.

  • Author

Ah..  Attaching the debugger to the client would actually save me a lot of time.

I'm debugging this OSS project and it's pretty brittle. There are many uncaught errors that crash the entire client (even the debugger console) so I can't read the whole stack trace after it crashes..

To be clear, how does the IDE attach to the client in such a way that my script will show up as an option? I'm not familiar with how I would inject the debugger into the execution of the JAR. Would attaching the IDE directly to the client allow the client to read and recognize the script over the stream?

2 hours ago, Master Of Hash said:

To be clear, how does the IDE attach to the client in such a way that my script will show up as an option? I'm not familiar with how I would inject the debugger into the execution of the JAR. Would attaching the IDE directly to the client allow the client to read and recognize the script over the stream? 

Correct.

atkvEgw.pngatkvEgw.pnghttps://i.imgur.com/atkvEgw.png

atkvEgw.png

Edited by NoxMerc

Best of luck with your scripts. If you need help, hop on the discord. I'm there almost 24/7, and nobody asks about scriptwriting anymore :c

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.