Graphical Analyzing - a debugging tool for programmers [RELEASED]

Asset Store Link
http://u3d.as/content/rapid-software/graphical-analyzing-tool/3hq

Description

The Graphical Analyzing Tool can help programmers visually measure, compare and analyze values that change over time.

Okay but what does it actually do?

Well the first part of the plugin keeps track of these graphs that you create (they automatically get created the first log call you do) and uses them to record values, both in memory (fixed amount) and also streamed to disk (endless) while your game is running.

While this is happening you can view these recorded values drawn as lines on a timeline in the editor window included in the package,
the second part of the plugin.
Since the values are streamed to disk, after the game is stopped all your recorded graphs will appear in a list which you can select and load in to look at in detail.

This is useful for debugging things like:

o Physics
o Animation
o AI
o State machines
o Timers
o Math calculations

and much more.

Having values displayed graphically can drastically help the programmer quickly see relationships between values and find problems that the old fashion step-by-step debugging method would have taken ages and been an extremely frustrating process.

All graphs can be viewed in a separate editor window during runtime and loaded back in after the game is stopped for a detailed investigation.
The plugin works in Unity Basic as well as Pro.

[Read the full article on how the tool helped me solve problems other ways of debugging couldn’t: http://rapidgamedev.blogspot.se/2012/08/graphical-analyzing-in-unity.html]

Contact
If you have any further questions you can email me at rapidgamedev at gmail dot com

And you just made me realize that this tool is the answer to debugging all of my problems :smile:. You should post why you made this tool in this topic so people don’t have to click on a link to understand the context of how this tool is used.

Thanks :slight_smile: I updated the description text on the top to include more information on some of the typical usages.

If you decide to grab the plugin, I would love to know if the example documentation is sufficient or if you want me to include more. And of course any feature requests etc. :slight_smile:

1 Like

going to pick this up, looks so useful.

The documentation looks pretty straightforward imo. Will let you know if there are any feature requests

This look a bit awesome :slight_smile: I think I’ll pick it up… Good job.

Thanks for the comments!

I just pushed out an update to the asset store, so it should be live in a day or two.
The new version has a feature called graph linking, see below:


(Click images to enlarge)

The new feature lets you connect graphs together so it’s now easier to view relevant values that span several graphs.

Please tell me that it works in javascript :slight_smile:

Yes - all languages are supported.

The example script that comes with the plugin is written in C# but it should be almost no different than how you use it in unityscript for example.
If you need any help just let me know :slight_smile:

Ok thank you… I’m sold :_)

Just a heads up, the new version is now live in the asset store.

This looks like a fantastic tool! I’m curious-- how does it handle things like string variables or enums? Do those show up in the graph? Or do they fire ā€˜events’ when they change like you illustrated in the mousedown example…?

Thanks!

Since enums can be represented as a numerical value, it is possible to log enums simply as Graph.Log("someState", (int)myEnum);
and the enum would show up as a line in the ā€œsomeStateā€ graph just like any other value would.

Strings on the other hand cannot be numerically represented so that’s when you can use Graph.LogEvent("myGraph", "Enter text message here");
Events show up as small dots (cyan colored in the example pictures on the top page) which you can hover over to read their message.

Note though that this tool purpose is mainly to log and draw numerical values, so I put in event messages as an option just for the convenience.
I might consider doing something like an advanced event logger in the future, but for me Debug.Log() and break points have usually got the job done.

Hope that answer your questions. Thanks for the feedback :slight_smile:

Okay great-- thanks for your reply!

Due to popular demand, a new feature has been added which lets you create and render graphs in game, both in screen space and world space.
This new update will not be available until Unity 4 comes out, because it uses a feature that will unlocked for non pro users.

Here’s some screenshots:

If the data is written on the disk, can’t they be used later, aka replay the data?
I know this has nothing to do with replay and it’s fine as it is really, but I had to ask :slight_smile:

Well that’s an interesting question, a replay system certainly share many similarities but there are a couple of reasons of why it wouldn’t be a good solution straight out of the box:

  • The graphlogger uses a simple uncompressed text format for storing values. For large replays, you would most likely want to use a binary format, combined with some kind of compression on that data so it doesn’t grow ridiculously large. The graphlogger was built for relatively short recording sessions.

  • All values are stored as 32 bit float’s including timestamps, and so if a replay session goes on for more than say - 20 minutes or even less, there is a chance that the values will slightly differ as time increases which could lead to weird behavior.

Just because the new version will support real time usage doesn’t mean it’s the best solution. In fact - I might include the source code in the next release so people can tweak it and optimize it etc, if they want to use it for any other purpose that it was intended for.
So I guess you could use it as a starting base for a replay system, but it would require a lot of tweaking.

Alright, as promised I just pushed out an update (1.2) that’s live on the Asset store.

This updates includes:

  • New user interface options (see image below)
  • Graphs can now be rendered live in the game window
  • Added graph bars (see image below)

If you are interested in getting the source code for the package then I will include it in an update, but only when it gets enough ratings. Right now there is not enough ratings; so it will show up as unrated when others browse the Asset store, and it would help me out a lot if you guys could do that. All you have to do is log in and click on how many stars you think it should get, which shouldn’t take more than a minute.

If there’s is some feature you would like to see implemented in the package, don’t hesitate to ask me, right here on the forum or my mail.

Hi,
Your plugin is a great time saver.
It works great but there’s not enough space to display 8 graphs

Feature request :
Could you add a vertical scrollbar in your graph debugger ?