Desynced

Desynced

Not enough ratings
Behavior Debug
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
7.824 KB
29 Sep, 2023 @ 7:31am
16 Aug, 2024 @ 1:33pm
7 Change Notes ( view )

Subscribe to download
Behavior Debug

In 1 collection by sacroimper
Sacroimper's Desynced mods
11 items
Description
This mod adds the ability to see the variable values while debugging, replace variables and parameters and put breakpoints.

Features

  • Hover over variables, parameters and unit registers to see the current value while debugging a behavior. (Only works for the main behavior, not on subroutines)
  • Breakpoints. 'Label' and 'Wait ticks' instructions now can work as breakpoints to pause the execution. Breakpoints can be set in the Extra Options of the instructions.
  • Refactor options. Replace or swap variables or parameters in the entire behavior.


Additional notes

  • Replacing a variable or parameter to empty will remove all its uses.
  • Swapping 2 parameters also swap their names.
22 Comments
sacroimper  [author] 30 Nov, 2024 @ 1:25pm 
You are correct. When this mod was made subroutines couldn't be visualized while the behavior was running, so this never was an issue until a recent update.

In the same update devs also added the "View current values" option, so I gave this issue a low priority as it is now a redundant functionality.

I've improved the mod description to make this clear and prevent confusions. Thanks for reporting.
Szteinoo 30 Nov, 2024 @ 12:50pm 
I think the tooltip for displaying actual value of the variable in subroutine is broken. It displays variables of the main program, not subroutines
Aberro 29 Jan, 2024 @ 7:13pm 
Ok, I see.
sacroimper  [author] 29 Jan, 2024 @ 12:30pm 
For editing without stopping, it would be a very complex task, reworking a big part of the UI and prone to crash with any game update. So probably not an option in the near future.
sacroimper  [author] 29 Jan, 2024 @ 12:26pm 
To mimic how breakpoints work in other languages, the behavior pauses before executing the instruction with the breakpoint. So adding a breakpoint into the Notify would not notify before stopping the behavior.

Usually notifications are followed by a Wait, to make sure that it gets at least some time to be seen before continuing the behavior, and Wait already have the breakpoint functionality.
Aberro 29 Jan, 2024 @ 9:49am 
Oh, and could you change or add breakpoint to Notify instead? I think it would be much more useful this way - we could use it as a kind of exception, for instance - when a branch of code is rarely occurring and we want to get notified as well as pause the execution.
Aberro 28 Jan, 2024 @ 10:45pm 
Btw, how do you think, could it be possible to edit behaviors on the fly? Without stopping them? I'd guess that this is in the game engine and therefore cannot be fixed, but maybe you've seen something otherwise?
Aberro 28 Jan, 2024 @ 10:41pm 
I love you! Just one day and poof, the main problem with the game is fixed!
sacroimper  [author] 28 Jan, 2024 @ 9:26am 
Updated. Now with breakpoints functionality in the 'Label' and 'Wait ticks' instructions.
sacroimper  [author] 28 Jan, 2024 @ 9:13am 
Breakpoints was something I wanted to do for some time but forget about it. Thanks to your suggestion I came back to it and now its implemented. Have a nice debug.