Jump to content

Remote Debugging - Attach a debugger to the TRiBot Client and debug your scripts


Naton

Recommended Posts

Note on remote debugging:

One important thing to note is that remote debugging is not specific to TRiBot. You can find a lot of resources out there on remote debugging. The CLI arg `--remote-debugger` simply tells TRiBot to apply the necessary JVM arguments when launching the TRiBot client so that you can attach a debugger to it.

 

How to use:

1) Start TRiBot with the --remote-debugger CLI argument. See the CLI Arguments section below for an example.

2) Set up a debug configuration in your IDE, and run it.

See the guides below to set up a debug configuration for Eclipse/IntelliJ.

It will automatically connect when you run the debug configuration, and you have a TRiBot client open that was given the --remote-debugger argument. For info on how to actually use a debugger, perform a quick google search on how to use a debugger with your specific IDE.

 

Eclipse:

Spoiler

Open Eclipse

Go to Run -> Debug Configurations in the menu bar at the top

607a6e7592263f2c0db859c1932f56e8.png

Search Remote Java Application

f1bb317ed72fc12eac539798ee4174cc.png

Right click 'Remote Java Application' -> New Configuration

You will then have a new debug configuration under Remote Java Application (empty the search for it to appear)

79a5ebae04164bb2ed965372bb4edb54.png

By default, TRiBot uses port 8000 as well, so all you have to do now is click the Debug button below

It will now attach to the TRiBot client you have opened with the CLI arg --remote-debugger

 

IntelliJ:

Spoiler

Open IntelliJ

Go to Run -> Edit Configurations

4e8d0998d779470e696abf8519aa8168.png

Click the plus sign to add a new configuration, and select Remote JVM Debug

5d38af5ea55541487cfb94cd1935e93e.png

TRiBot uses 8000 as the port for default, so switch that to 8000

(you can include an additional CLI argument to set a different port, but we won't do that here)

Then click Apply, and OK

Now click Run -> Debug at the menu bar again, and select the debug configuration that you just created.

It will now attach to the TRiBot client you have opened with the CLI arg --remote-debugger

 

CLI Arguments:

To use remote debugging, simply launch TRiBot with the argument --remote-debugger

Ex.

java -jar tribot-splash.jar --remote-debugger

 

By default, the port 8000 is used.

To specify a port, include the argument --remote-debugger-port

Ex.

java -jar tribot-splash.jar --remote-debugger --remote-debugger-port 8001

 

View all my bots on the TRiBot store! (premium) (free)

Need assistance with any of my bots? Join the nScript support discord (link below).

nScripting.com    nScript Support Discord     Refund Policy

Automate your bot management through nRestocker and the TRiBot Bulk Launcher

Link to comment
Share on other sites

2 hours ago, gigiwest123 said:

Thanks Naton, is remoting debugging what we'd need to use if we wanted to test a script out line by line?

Yes this would be used to attach a debugging and step through your code line by line

View all my bots on the TRiBot store! (premium) (free)

Need assistance with any of my bots? Join the nScript support discord (link below).

nScripting.com    nScript Support Discord     Refund Policy

Automate your bot management through nRestocker and the TRiBot Bulk Launcher

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.

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.

×
×
  • Create New...