Search - User list
Full Version: APEX Script: how to debug?
Root » Rigging » APEX Script: how to debug?
kodra
Well I think APEX Script is cool, but it doesn't seem to be easier to debug than manipulating a graph with Python...

How do you even print a debug message?

https://www.sidefx.com/docs/houdini/character/kinefx/apexscriptfunctions.html#specialfunctions [www.sidefx.com]

...is the only way creating a sticky note...?
jonathangardner
Hey Kodra,

In H20.5 there isn't a good way to print debug messages from an APEX graph (or from APEX Script) but we're aware of this gap and we're working on a Logcallback for APEX that could be used to log messages, warnings, and errors as well as throw custom error messages to our nodes which invoke APEX graphs.

Once the design of it is finalized, we'll add printing support to APEX Script.
christopherk
Hi there, yes we are unfortunately currently missing print and error callbacks in APEX. In the meantime, I find the best way to debug is to format debug log statements as strings using the string::Format callback and associated string formatting syntax in APEX Script, and then wire the debug strings to the output of the graph, or collect the list of all debug prints in a StringArray and wire that to the output of the graph. I also find the "Inspect Line" feature quite useful for finding where in a graph a particular line corresponds to, so that I can directly inspect the graph to find issues there.
elovikov
in the meantime this stupid trick can work:


I've attached the hip as well. the only thing is connect the output, even void one
not sure how log callback would be different, but this workflow is a bit painful

I personally think apex engine would benefit from any sort of conventional tagging, like if I'm tagging node (function, subnet, whatever) as traceable it just dump it's inputs and outputs. this alone actually would cover a lot of debugging
cwrenniks
Is there a way to do something like this but get the debug information while in the animation state? I want to debug my rig graph values while animating my character.
raincole
cwrenniks
Is there a way to do something like this but get the debug information while in the animation state? I want to debug my rig graph values while animating my character.

The above RunVex trick should work in animation state as well.

But man it's such a hack and extremely painful to debug this way.
cwrenniks
I'm not seeing how to get the data in real time, while moving a rig. As an example, imagine outputing the translation vector while manipulating a joint. Is there a way I'm missing to do this? I'm starting to go down a path to figure out how to just log the information to a file, but that is also a pain.
Fraenk
I can confirm that this definitely works. Thanks a lot elovikov
markwilly
kodra
APEX Script: how to debug?    1225   7   2SUBSCRIBE   REPLY


kodra
Member

373 posts
Joined: June 2023
Offline
 July 13, 2024 4:45 A.M.
Well I think APEX Script is cool, but it doesn't seem to be easier to debug than manipulating a graph with Python...

How do you even print a debug message?

https://www.sidefx.com/docs/houdini/character/kinefx/apexscriptfunctions.html#specialfunctions [www.sidefx.com]

...is the only way creating a sticky note...?

To debug APEX Script, you can use the print() function to output messages in the Houdini console. For more advanced debugging, set breakpoints or use Houdini’s debugger. Sticky notes aren’t necessary for debugging.
Fraenk
There is a Apex-Log-Node (myLogNode = graph.addNode('myLog','Log',formatstring='{}') <- syntax)you can use, which (I find) easier to handle and work with. You will have to activate "APEX" in the log-viewer to see it's output. This also logs in animation-state.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB