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 your script

Featured Replies

Hi all, 

 

So I am new to creating osbot scripts and I have coded together something quite simple, but once it completes one state it will does not seem to run the next appropriate state. Is there any way at all that you can debug the script and see if it will hit breakpoints that are set? For example, attach to osbot and see where the code is going? Note, I am using IntelliJ.

 

Hope this makes sense and somebody can help me!

Thanks,

Unseasoned

Edited by Unseasoned

Or you can use the log function and just log what its doing. For example, log your conditional statement results to see where its getting hung up. Also a good idea is to have it log the state its currently on.

Or you can use the log function and just log what its doing. For example, log your conditional statement results to see where its getting hung up. Also a good idea is to have it log the state its currently on.

Exactly this, log every action your script does so you know what it doesnt do / where it fucks up smile.png

  • Author

Or you can use the log function and just log what its doing. For example, log your conditional statement results to see where its getting hung up. Also a good idea is to have it log the state its currently on.

 

Very useful tip both of you, thanks:) I'll look to do that. I'm logging quite a lot at the moment, but just not the conditional statements. Just curious though, is there any way of attaching a debugger?

Very useful tip both of you, thanks:) I'll look to do that. I'm logging quite a lot at the moment, but just not the conditional statements. Just curious though, is there any way of attaching a debugger?

 

I'm sure there is but it's most likely not very simple to make it run real-time and it's very unnecessary. The nature of OSBot scripts mean it's often very predictable where abouts an error is and what's causing it. You can always use log statements to narrow it down and tell you variable information before the bug. This makes an official debugger redundant I spose.

There's a server debug mode with command line arguments in the latest dev version Im sure you run in debug mode with IntelliJ but I dont imagine its the simplest of tasks and I use Eclipse so I couldnt help you.

 

43e191805a82b5352d31a7ebd248472e.png

Edited by LoudPacks

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.