Jump to content

Using the debugger with OSbot local Scripts


battleguard

Recommended Posts

Debugging scripts in osbot is pretty simple once you learn abut debugging localprocesses. Here are the basic steps you will need

1. Add a breakpoint into your local script you have create

2. Set your build output to go to your OSBOT scripts folder

uWNlKWR.gif

fCc1j3i.gif

3. Create a debug configuration that starts an application with the entry point of org.osbot.boot

hDNkilV.gif

4. Run your configuration (do not debug it) to bring up osbot so your local processes in intellij can see it.

5fyQfdo.gif

5. log into your account and then you are ready to attach to the local script process through intellij. Once you have attached run your script and you should now be debugging your script so any breakpoints that the code hits will now stop and allow you to see the variables.

bXTYCEU.gif

6. you can also add watches to quickly look up things without using print lines and make debugging much easier now.

rZoII0h.gif

7. if you need to do more complex statements you can use evaluate expression to have multiple lines.

Looks like images got deleted from site so to view the gifs that explain each step use this google cache link

https://webcache.googleusercontent.com/search?q=cache:zre9YWkp3WsJ:https://osbot.org/forum/topic/133159-using-the-debugger-with-osbot-local-scripts/+&cd=1&hl=en&ct=clnk&gl=us

or this imgur link: https://imgur.com/a/smwr5lu

C1ftlgJ.gif

Edited by battleguard
  • Like 10
Link to comment
Share on other sites

  • 10 months later...

After I was done running the debugger, it wouldn't rebuild my jar file and it lost the JDK for the module. Is there a proper way to stop the debugger?

My classes all changed to this: https://gyazo.com/31f882c551a2235cf509a487c5d8924b  

I ended up making a new project and just copy and pasted the code into it. Couldn't figure out how to fix it otherwise 

Link to comment
Share on other sites

  • 4 months later...
On 10/1/2018 at 3:21 AM, Dab in a Lab said:

After I was done running the debugger, it wouldn't rebuild my jar file and it lost the JDK for the module. Is there a proper way to stop the debugger?

My classes all changed to this: https://gyazo.com/31f882c551a2235cf509a487c5d8924b  

I ended up making a new project and just copy and pasted the code into it. Couldn't figure out how to fix it otherwise 

I have encountered the same issue.

Select "Inherit project compile output path" should help

Edited by Pegasus
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...