Jump to content
UBot Underground

Debugging Best Practices, How To Search, Breakpoints


Recommended Posts

hi
I'm trying to debug an older bot where the site seems to have changed a bit.
Since there are no breakpoints in the software I put "stop script" command and move it around then run the program to the stop. Problem is every time I want to move it I have to scroll around and search for it manually since there is no search. After I finish a run, the node view jumps back up to around 25% down. If I have to stop it manually because it didn't finish, I remember where the scroll box is, click stop, view jumps up, then I hold mouse in the area of where I dropped the breakpoint. Once there I still have to eye ball it to find the spot. After a couple hours of this, it's really annoying. There must be a better way and I'm surprised more people don't ask for a search function.

I was told that others just paste into a text editor and search there but that's not really practical when you need to jump to certain line to revise/debug constantly (or really never practical in my mind). Every coding platform I've used always has at least a simple search function and usually also easy breakpoints that are really helpful for coding and debugging. For example xcode, android studio, vba, matlab. In almost every piece of software, I can ctrl+F to find something.

Lastly, if you use code view, how do you debug there? It seems when you step through there is no indicator which line you are on. At least in node view there is the purple box (even though sometimes it is hard to see against other dark colored boxes. I wish it was bigger and more obvious so it stands out especially after hours of staring at code.

Link to post
Share on other sites

Having the same problem. I use also a lot of alerts and pause scripts. And yes in mine opinion the line edtirot could use also more options for searching etc. Maybe they can implement something that it opens visual studio or notepad++ and when you save it directly goes back to node view. Seen that with other software packages. Maybe they need to look at unity3d that has a similair option and i use that a lot.

Link to post
Share on other sites

I tend to go pretty wide and have lots of tabs and in each have custom commands/functions. That way everything is organized and it makes finding things much quicker/easier. As for debugging I tend to rip stuff out and put it into a separate Ubot instance to work on it and test it separately. Of course running a full test you just have to run the whole program but it makes everything else a lot easier.

 

But it would be nice to have some more features like break points and searching for lines which contain the query.

Link to post
Share on other sites

there is extensive tools for that purpose but if it is a old bot you would be out of luck

 

It's working in the latest version of uBot.

Which tools are you suggesting? While I'm open to add ons, I think the basics of text search and something like breakpoints should be included in a ~$1k software package without the need for plugins.

Link to post
Share on other sites

I tend to go pretty wide and have lots of tabs and in each have custom commands/functions. That way everything is organized and it makes finding things much quicker/easier. As for debugging I tend to rip stuff out and put it into a separate Ubot instance to work on it and test it separately. Of course running a full test you just have to run the whole program but it makes everything else a lot easier.

 

But it would be nice to have some more features like break points and searching for lines which contain the query.

 

Thank - great idea to rip stuff and create a separate instance to debug. The part I'm working on right now, however, relies on variables from earlier in the script, so not quite that simple. I also like the tabs idea. So far I've only used 1 tab, so for now, I still have to deal with scrolling and scrolling.

 

Do you know where I can find some docs on how to use separate tabs and then call the script on those tabs? Are you using DEFINE on the 2nd tab and then calling the new function on the 1st TAB?

Link to post
Share on other sites

Thank - great idea to rip stuff and create a separate instance to debug. The part I'm working on right now, however, relies on variables from earlier in the script, so not quite that simple. I also like the tabs idea. So far I've only used 1 tab, so for now, I still have to deal with scrolling and scrolling.

 

Do you know where I can find some docs on how to use separate tabs and then call the script on those tabs? Are you using DEFINE on the 2nd tab and then calling the new function on the 1st TAB?

 

Yes you can put a define in the second tab and call it from the first, if you take this code below and put the define in the second tab but keep the command to call it in the first and then run the first tab you will see:

MyCommand("This is a message")
define MyCommand(#message) {
    alert(#message)
}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...