SRDebugger - On-Device Console, Options Panel, and Bug Reporter

SRDebugger is a tool to help you track down bugs while on the target device.
Access to the Unity Console in any build of your game allows you to diagnose problems without deploying a debug build tethered to the Unity Editor.
The options tab can help you tweak parameters and invoke methods, enabling fast iteration of gameplay features.
Designed from the ground up for performance, SRDebugger can be included in all builds of your product with minimal footprint.

ASSET STORE | WEBSITE | DOCUMENTATION | WEBPLAYER DEMO

Key Features

  • Unity 2017/2018 Compatible. Supports Unity 5.6 and greater.
  • View the Unity3D console log at runtime on your mobile device, without tethering to your laptop.
  • Console can be docked to view the log while in-game. (NEW)
  • Configure keyboard shortcuts for quick access on desktop platforms.
  • Allow users to send bug reports directly to your email address with console log and screenshot attached.
  • Tweak properties in the options panel, test out new parameters without redeploying to your device.
  • Create toggles to enable debug features - god mode, debug hud, etc.
  • Setup actions that can be executed to perform useful tasks. Go to level, restart game, player, etc.
  • Pin any option to the in-game view to tweak values without opening SRDebugger.
  • Profile tab presents an approximated breakdown of how long each step of the frame took to execute.
  • Examine specs of the device your game is running on.
  • Display build manifest when using Unity Cloud Build.
  • High performance. Console supports hundreds of messages. With the debug panel closed, monitoring footprint is tiny.
  • Responsive design supports any resolution or orientation.
  • Implemented in the new Unity UI.
  • Works in Unity Free/Personal and Unity Professional.
  • Full C# source code included.

Currently supports Standalone, iOS, Android, Windows 8 and Web Player platforms.

Screenshots

Demonstration

SRDebugger is accessed via a hot-spot in the corner of the display. Simply triple tap to open.

Optionally, this hot-spot can be disabled and the debug panel opened from script.

SRDebug.Instance.ShowDebugPanel();

The options tab provides a simple interface for tweaking properties or invoking actions.

Any properties of supported types defined in the SROptions class this tab.

public partial class SROptions {
    private float _myProperty = 0.5f; // Default Value
 
    [Category("My Category"]
    public float MyProperty {
        get { return _myProperty; }
        set { _myProperty = value; }
    }
}

Any property or action from the options tab can be pinned, so it will appear even when the debug panel is closed. This is perfect for fine-tuning gameplay related parameters.

Any questions, please donā€™t hesitate to post below or shoot me an email at simon@stompyrobot.uk. Check out our website for more information about SRDebugger! Thank you for reading :slight_smile:

BUY ON ASSET STORE | WEBSITE | DOCUMENTATION | WEBPLAYER DEMO

Hi. I just bought SRDebugger but I get this error when I import the SRDebugger asset:

Assets/StompyRobot/SRF/Scripts/Helpers/RealTime.cs(6,21): error CS0101: The namespace global::' already contains a definition for RealTimeā€™

It seems that NGUI also has a ā€˜RealTimeā€™ class:

//----------------------------------------------
//NGUI: Next-GenUIkit
//CopyrightĀ©2011-2014TasharenEntertainment
//----------------------------------------------

usingUnityEngine;

///<summary>
///Time class has no timeScale-independent time. This class fixes that.
///</summary>

public class RealTime : MonoBehaviour
{
#ifUNITY_4_3

To get around this problem I just deleted Assets/StompyRobot/SRF/Scripts/Helpers/RealTime.cs. But when I build (Or try to run in the Editor) tapping three times in the specified corner does not bring up the debugger. Also It is causing my project to crash on load so often that I have to delete the project, and reopen my old project and re-import SRDebugger from the Asset Store.

Hi @TokyoDan , thanks for purchasing. Iā€™m sorry youā€™re having problems.

The next update will remove the RealTime class (itā€™s part of SRF, my supporting library, and isnā€™t used by SRDebugger specifically, so can safely be removed as you have done).

Re. the debugger not showing, have you added the SRDebugger.Init prefab to the scene you are running? You can take a look at StompyRobot/SRDebugger/Scenes/Sample.unity to see a simple setup of how it should look.

The crashing bug is strange, Iā€™ve never encountered the kind of editor crashes you seem to be getting. Do you have any error messages or a stack trace of a crash I could take a look at?

Simon

Hello Simon.

Forget the crashing. Although when I imported SRDebugger into my project I was using Unity 4.6.2. Later when I went to work on it again I was getting confused and loading my project (with SRDebugger) in an older version of Unity (4.5.5). I got 3 versions installed and sometimes I start up the wrong one. When I do this the project hangs on load (spinning BeachBall) and I have to Force Quit it. Sorry to alarm you.

My problem now is that it just doesnā€™t work when I add the SRDebugger.Init prefab to my scene. In the Editor it runs with no errors but it seems that it is not acknowledging my triple-tap to start up SRDebugger. Nothing happens. BUT If I load the sample scene that is included with SRDebugger it works fine and looks real nice.

Maybe not acknowledging my triple-tap is a conflictā€¦

Although I use Unity 4.6.2 I am not yet using any of Unityā€™s 2D stuff. As for UI I am using NGUI because my project is too far along to change to a different UI system right now. I started my project two years ago long before Unityā€™s 2D GUI came out.

Another possible conflict may be because I am using FingerGestures http://fingergestures.fatalfrog.com OnTap() on my Default layer and that may be masking the tap from getting to SRDebugger:

 void OnTap(TapGesture gesture)
    {
        if(gesture.Selection != null)
        {
            if(gesture.Selection.name == "TOTplayButton")
            {
            }
            else if(gesture.Selection.name == "TOTsettingsButton")
            {
            }

Maybe SRDebugger should use itā€™s own layer so as not to conflict.

Regards,
Dan

Hi Dan,

Good to hear you resolved the crashing issue, that had me pretty concerned for a moment!

Does the debugger appear correctly if your scene camera has a culling mask that includes the built-in UI layer? Iā€™ve got an idea to include an option in the SRDebugger Settings window to select the layer that SRDebugger will use for rendering and input, which could help in situations such as yours.

Regarding compatibility with NGUI and FingerGestures, the new Unity UI event system provides a IsPointerOverGameObject() function which you can use to check if the debugger panel is blocking a touch, before your NGUI or FG code responds to it.

For FingerGestures you can use the FingerGestures.GlobalTouchFilter delegate to filter out touches that are interacting with the Unity UI. In my own games I use this, feel free to use it in your project:

    public class FingerGesturesUnityEventsFilter : MonoBehaviour
    {

        void Awake()
        {

            FingerGestures.GlobalTouchFilter = GlobalTouchFilter;

        }

        private bool GlobalTouchFilter(int fingerIndex, Vector2 position)
        {

            var isMouse = FingerGestures.Instance.InputProvider is FGMouseInputProvider;

            if (isMouse) {

                if (fingerIndex == 0)
                    fingerIndex = -1;

                if (fingerIndex == 1)
                    fingerIndex = -2;

                if (fingerIndex == 2)
                    fingerIndex = -3;

            }

            if (EventSystem.current.IsPointerOverGameObject(fingerIndex))
                return false;

            return true;

        }

    }

Something similar might be possible for NGUI.

Hi @Dosetsu , SRDebugger should be fully namespaced. Are you talking about the Util class in SRDebugger/Scripts/Internal/Util.cs? That appears to be in the SRDebugger.Internal namespace.

Yes, i see my error now - thanks so much for the reply!

Iā€™m glad itā€™s resolved. Thank you for your purchase! :slight_smile:

Great package - highly recommend for everyone :slight_smile:

Version 1.0.1 has just been submitted to the Asset Store for approval, with Unity 5.0 support and bug fixes.

1.0.1
----------

New:
- Unity 5.0 Support.
- Added option to Settings pane to require the entry code for every time the panel opens, instead of just the first time.

Fixed:
- Removed debug message when opening Options tab for first time.
- Fixed conflict with NGUI RealTime class.
- Fixed layout of pinned options when number of items exceeds screen width.

Thanks all for your purchases and messages so far. If you find it useful it would be great if you could leave a review on the Asset Store :slight_smile:

The next update will include Windows Store support, and hopefully IL2CPP support for iOS (Iā€™m waiting on a few bug fixes on Unityā€™s side before this can be finished)

I included ā€˜UIā€™ in my scene cameraā€™s culling mask. And that doesnā€™t help.

And I donā€™t think my problem is the debugger panel blocking a touch, before my NGUI or FG code responds to it. Itā€™s the other way around as the debugger panel never appears. I think maybe NGUI or FG are blocking touches from hitting that little square area in the corner that you tap on to bring up the debugger panel.

@TokyoDan , here is a list of things that might help us track down the issue:

  • If you disable the NGUI root GameObject does the corner-trigger work?
  • Can you try selecting the EventSystem gameobject that is created at runtime (example screenshot) and checking if itā€™s responding to input correctly?
  • If you select SRDebugger/Trigger/Trigger(Clone) at runtime and set the GraphicRaycaster ā€œBlockingObjectsā€ field to None does that help?

If none of these help, if you could package up a repro project that demonstrates the issue that would be the quickest way to solve this.

A bit more info. As far as Iā€™m aware, NGUI and FG shouldnā€™t interfere with the Unity UI EventSystem directly. Itā€™s possible that they might be blocking raycasts of some kind, but I was under the impression that the GraphicRaycaster component didnā€™t use the physics system for raycasting, so itā€™s a bit odd that weā€™re seeing probems here.

EDIT:

Iā€™ve just finished porting a project of mine that uses NGUI and FingerGestures extensively to use the latest version of SRDebugger, and it seems to work fine without any problems.

Could you also screenshot for me the camera you have in the scene that is having problems? (Specifically, I want to see the Culling Mask). I might have a few ideas for changes that might fix your problem, if none of this helps Iā€™ll see about getting you a beta version of the next update with those changes in place.

My game starts with a 1st ā€˜DontDestroyOnLoadā€™ scene (TOTinit) which just has some initialization scripts (no camera) and quickly loads a 2nd scene (TOTinit2) which has a Main Camera and also has some initialization scripts and animation. In this 2nd scene there is also a PLAY button that starts the game by loading the 3rd scene (Play).

I donā€™t have to go as far as loading the 3rd (Play) scene to experience my problem

Since my 1st scene does not have a camera I also tried putting the SRDebugger.Init prefab in my second scene so that I could add ā€˜UIā€™ layer to my Main Cameraā€™s culling mask.

NGUI is not used in these 1st two scenes. But I forgot to mention that PlayMaker is. Also FingerGestures is used. Anyway I disabled the PlayMaker root objects and that didnā€™t help.

I selected the EventSystem gameobject that is created at runtime. And at the bottom on the Inspector I could see it updating pointer position and mouse clicks.

I selected SRDebugger/Trigger/Trigger(Clone) at runtime and set the GraphicRaycaster ā€œBlockingObjectsā€ field to None. That didnā€™t help either.

As far as packaging up a repro project that demonstrates the issue the only thing I could do is send you my whole project. I see no value in trying to pare it down to isolate the problem as Iā€™d end up getting rid of so much of my game that Iā€™d find that SRDebugger is incompatible in my game and will not suit the purpose for which I bought it tis time. (although I do plan to use it in future games or once we figure out why itā€™s not working in my project)

Iā€™d need an email address so I could sen you a Dropbox URL to the project.

Anyway Iā€™m sure the problem is not due to any deficiency in SRDebugger. It is caused by the complexity and probably unorthodox way I use scenes in my project.

Thanks for your great support.

Iā€™m starting to think that the size, placement (Y position), and rotation of the trigger for SRDbugger may be the problem. My game is a board game in 3D space. The board is orientated is such a way that X= width, Z=height, Y= the face on which pieces are placed. When you look at the board you are looking down, and if the pieces are forced off the board they fall (-Y). I think in normal 2D, X= width, and Y=height and there is no Z (except for depth and parallax scrolling effects)

To achieve certain effects I do animation of planes. For example I have a blank plane at startup which just fills the screen. Then another plane with 3D game objects (start button, settings button, title, etc) slides in from the -Y direction and ā€˜pokesā€™ through the blank startup plane. (You can see this effect at http://www.azumachogames.com/the-octagon-theory/#Example )

I think the trigger is not is a position that is unobstructed, sized or facing properly.

In SRDebugger Settings when I set the corner for the trigger position. Of what object is that the corner of? What determines the actual size, rotation and x,y,z position of that trigger?

Maybe there should be more settings for that trigger to allow positioning in 3D space, in addition to its default 2D positioning.

@TokyoDan , if youā€™re fine with sending me the entire project that is having the problem, Iā€™m fine with that. Iā€™ve sent you an email with my Dropbox email address.

Hmmm. I didnā€™t get any email. Did you send it to the one that starts with tokyo or the one that starts with huffman?

I sent it to the one starting with Huffman. If youā€™re just sending a shareable link, sending it to simon@stompyrobot.uk will reach me.

OK. Thanks. Iā€™ll send it in a minute. To simply things all it does is start up with the 1st Scene (TOTinit) which has no camera and quickly loads the 2nd scene (TOTinit2) which does have a camera. I stop it there with a blank screen as it doesnā€™t load any other scenes or any game objects. SRDebugger.Init is in scene TOTinit2 because scene TOTinit has no camera. The Main camera culling mask is set to Default & UI. The Trigger position is set to bottom left.

The project is named TOT 3 SRDebug and is zipped.

@TokyoDan , just replied to your email. Let me know if it helps.