Search Unity

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

Discussion in 'Assets and Asset Store' started by Simie, Feb 7, 2015.

  1. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger 1.1.0 is now available on the Asset Store!

    Here is the changelog:

    1.1.0
    ----------

    New:
    - (Unity 5) Can enable "Auto-Init" in the Settings pane to automatically initialize SRDebugger without SRDebugger.Init prefab included in the scene.
    - (BETA) Bug Reporter - Users can submit bug reports, with console log and system information included. These will be forwarded to you by email. (Enable in Settings)
    - (BETA) Windows Store support
    - Added support for Keyboard Shortcuts
    - Added Trigger Behaviour option. Switch between "Triple-Tap" and "Tap-And-Hold" methods for opening debug panel
    - Added Default Tab option in Settings pane
    - Added Layer option to settings panel to choose which layer UI will be on
    - Added Debug Camera mode (render debug panel UI to a camera instead of overlay)
    - SRDebug.Init() method added for custom initialisation of SRDebugger without SRDebugger.Init prefab
    - Event added to SRDebug on panel open/close

    Changes:
    - Scroll sensitivity has been improved for desktop platforms
     
    Last edited: Jun 17, 2015
    tosiabunio likes this.
  2. MarkVanguard

    MarkVanguard

    Joined:
    Sep 8, 2014
    Posts:
    3
    Hi Simie,

    Firstly, this is an awesome plugin! We have version 1.1.0.

    When trying to use Categories as per the examples:
    Code (CSharp):
    1.     [Category("Test")]
    2.     public float TestFloat
    3.     {
    4.         ...
    We get the following compile errors:
    error CS0246: The type or namespace name `Category' could not be found. Are you missing a using directive or an assembly reference?
    error CS0246: The type or namespace name `CategoryAttribute' could not be found. Are you missing a using directive or an assembly reference?

    This is easily fixed by commenting out the preprocessor In SROptions.cs:
    Code (CSharp):
    1. #if NETFX_CORE
    (we build for iOS and Android during development, and dont have NETFX_CORE defined)

    We wanted to check what the intention was behind this define?
     
  3. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi Mark,

    The CategoryAttribute is usually defined in the System.ComponentModel namespace. On Window Store, the System.ComponentModel namespace is not available, hence the definition in SROptions.cs for that platform. I've just realised that the definition there is not namespaced correctly so files importing the System.ComponentModel namespace will have missing namespace errors when deploying to Windows Store. I'll be releasing a patch for that soon.

    In the mean time, simply importing the System.ComponentModel namespace in your file should give you access to the CategoryAttribute. I'll be clarifying that in the docs shortly.
     
  4. MarkVanguard

    MarkVanguard

    Joined:
    Sep 8, 2014
    Posts:
    3
    Thank you Simie, for the amazingly fast response, the detailed explanation and the working fix.
    Just tested it and it works perfectly.
     
    Simie likes this.
  5. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    No problem. I'm glad to hear you've got it working!
     
  6. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger 1.1.1 has just been submitted to the Asset Store for approval. Changelog below:

    1.1.1
    ----------

    Changes:
    - The version of SRF (https://github.com/StompyRobot/SRF) has been changed to the "Lite" version, containing only scripts relevant to SRDebugger. If you want the full SRF library it is available free on GitHub.

    Fixes:
    - SRDebugger no longer creates an event system in a scene if one already exists on Unity 5 using Auto-Init.
    - Fixed CategoryAttribute being in the wrong namespace when when compiling for Windows 8 platforms.

    Also, the online documentation has been updated to reflect changes in the latest versions of SRDebugger.

    http://stompyrobot.uk/tools/srdebugger/documentation/
     
    Last edited: Jun 17, 2015
    tosiabunio likes this.
  7. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger is on sale 85% off for Level11 users this month!
     
    tosiabunio likes this.
  8. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    For users that are deploying to iOS with IL2CPP enabled, SRDebugger is mostly working. There are a few bugs with the options panel with the less common number types (ubyte, short, uint). This will be fixed in the update after 1.1.1. Contact can contact me via PM if you need the fix before then.
     
  9. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    the demo, after I close sr debugger, I cannot open it again.
     
  10. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi imtrobin, thanks for purchasing. Can you provide some more details about the problem you're having? Is this happening in the editor or in the built product, and are there any error messages in the console?
     
  11. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger 1.1.1 is live on the asset store now. :)
     
  12. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Incremental release 1.1.2 has just been submitted to the asset store, and includes web player platform support for the bug reporter, IL2CPP fixes and support for the upcoming Unity 5.1.

    1.1.2
    ----------

    Changes:
    - Bug reporter is now supported on Web Player builds (now uses Unity WWW instead of HttpWebRequest for API calls)
    - System Information area now shows IL2CPP status on iOS builds
    - Application.platform value is now included with bug reports
    - Support for Unity 5.1

    Fixes:
    - Fixed issues with options panel and IL2CPP on iOS
    - Unity Cloud Build information now formatted correctly
    - Fixed Settings UI issue on Unity 5.1 beta
    - Fixed Entry Code setting having no effect
    - Fixed keyboard shortcuts bypassing entry code if enabled



    ATTN: Users updating from 1.1.0 to 1.1.1+, please delete the "StompyRobot/SRF" folder and import the new package again if you are getting compile errors.
     
    Last edited: Jun 17, 2015
  13. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Version 1.1.2 has been approved and is now available on the Asset Store.

    Thanks all who have purchased!
     
  14. testure

    testure

    Joined:
    Jul 3, 2011
    Posts:
    81
    What is the 85% off sale referring to in the first post- I don't see anything about it on the asset store and a google search for "level11 sale unity" turned up nothing but this thread. Can you elaborate? I'm interested in your debug console but at the moment i'm a solo dev on a budget, so a sale is very enticing :)

    edit: nevermind- i wasn't logged in to the asset store. for some bizarre reason if you're not logged in it doesn't show you the sale price.
     
    Last edited: May 7, 2015
  15. skumancer

    skumancer

    Joined:
    Feb 1, 2015
    Posts:
    5
    Hi,

    I'm getting a constant crash on iOS. It works on desktop (Mac).

    I'm running Unity 5.0.1p3 (I needed the NSURL bug fix from it).

    Help is greatly appreciated!

    - Ricardo

     
  16. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I think it's because the Level11 sale is only for Unity Pro users. If you're not logged in it can't tell if you own Pro or not, I'd guess.

    Thanks for your interest!
     
  17. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi Ricardo, I'm just looking into this now. Is there a stack trace or anything which might point to the issue? (I can see there is a broken image link in your post, but it 404s when I try to visit it)

    EDIT: I can't seem to reproduce the crash using 5.0.1p3. Could you send me a screenshot of the stack trace and the console log when it crashes?
     
    Last edited: May 7, 2015
  18. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    What is the mechanism that you are using for the bug reports? I see mention of an API key? who is hosting this? is this a service that we can host ourselves, or is it a 3rd party thing that you have tied into?

    Thanx in advance,
    Mike W
     
  19. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi Mike,

    At the moment, this is a service I am hosting. It simply accepts bug reports from the user and forwards them to the email address associated with an API key.

    Simon
     
  20. skumancer

    skumancer

    Joined:
    Feb 1, 2015
    Posts:
    5
    Here's a link to it, sorry about that: https://www.dropbox.com/s/iuhykc3p6yte8xt/SRDebugger_error.png?dl=0
     
  21. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Is there an error in the console similar to "Ran out of trampolines of type 0/1/2" ? That's the only error I can think of which might cause that stack trace.

    If so, check out the Unity docs here: http://docs.unity3d.com/Manual/TroubleShootingIPhone.html
    Scroll down to “Ran out of trampolines of type 0/1/2” runtime error for ways to fix that. You need to make sure to use the correct option for the type of trampolines that have run out.
     
  22. skumancer

    skumancer

    Joined:
    Feb 1, 2015
    Posts:
    5
    Yep, I go that error message at least once, but not consistently. Let me try that and report back.

    Thanks!
     
  23. skumancer

    skumancer

    Joined:
    Feb 1, 2015
    Posts:
    5
    I was running out of type 2 trampolines. I set it to 4096, but I don't know what a good size is. Any tips?
     
  24. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    The default is around 128, so I'd set it to 256 or 512 for now and increase it later if you encounter the error again.
     
  25. skumancer

    skumancer

    Joined:
    Feb 1, 2015
    Posts:
    5
    Perfect, I wanted to know the baseline to see how much I need to increase it by. Thanks, very cool plugin!
     
    Simie likes this.
  26. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    is the source for this service available to subscribers? I guess I could re-implement whatever call you are making to the server, just curious.
     
  27. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    It's definitely something you could reimplement yourself if you wanted. It sends a JSON request with the bug report to a URL specified in Api.cs.

    The JSON request looks like this:

    Code (csharp):
    1. {
    2.    "systemInformation":{
    3.       "<category>":{
    4.          "<entry>":"<entry value>",
    5.          "<entry>":"<entry value>"
    6.       },
    7.       "<category>":{
    8.          "<entry>":"<entry value>",
    9.          "<entry>":"<entry value>"
    10.       }
    11.    },
    12.    "userEmail":"<user provided email address>",
    13.    "userDescription":"<user provided bug description>",
    14.    "console":[
    15.       [
    16.          "<log type>",
    17.          "<log message>",
    18.          "<stacktrace (if available)>"
    19.       ],
    20.       [
    21.          "<log type>",
    22.          "<log message>",
    23.          "<stacktrace (if available)>"
    24.       ]
    25.    ],
    26.    "screenshot":"<base64 encoded PNG screenshot>"
    27. }
    The source for the service is not available to subscribers at the moment. However, I don't think the source will be very helpful to you, as most of the complexity is in handling multiple users and API keys. Implementing your own service to handle the above JSON and modifying the endpoint in Api.cs to point to it should be pretty easy, though.
     
  28. ProtoJazz

    ProtoJazz

    Joined:
    Nov 27, 2012
    Posts:
    19
    Saw this on the level 11 page. Bought it instantly. Havent used it yet, but it looks amazing. I love that it seems like its very open and customizable. The fact that I can switch where the bug report info gets sent is super helpful. I can see adding a script to my bug tracker that automatically parses the JSON and makes a ticket for it.

    Ive been looking for something lIke this for a long time. Theres lots of debugging tools, but not many that give you the debug info in game, and let you adjust values at run time on device.
     
    Simie likes this.
  29. Deleted User

    Deleted User

    Guest

    whoops....that was weird..sorry...I need this to debug my project, and had to debug the debugger..ARGH!!!! You were right, another class...
     
    Last edited by a moderator: May 31, 2015
  30. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @ForceVFX, I've replied to your email but I'll copy it here:

    The Util class it is referring to is located in StompyRobot\SRDebugger\Scripts\Internal\Util.cs. I'm guessing you have a Util class somewhere else in your code which is somehow taking precedence over that one. A potential fix for this would be to change the namespace in StompyRobot\SRDebugger\Scripts\Internal\Util.cs from SRDebugger.Internal to SRDebugger, which should force the SRDebugger Util class to take precedence over your built in one in places where that error is occuring.

    Let me know if that works, and if so I'll include that change in the next version so you don't have to worry about doing it every time I update the package.
     
  31. Deleted User

    Deleted User

    Guest

    yes, that was it...

    sorry...I needed this to debug my project, and had to debug the debugger..

    How do I get my android logs....like ADT. window?? ..does it?
     
  32. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I understand that would be frustrating! I'm glad the solution helped. I'll make that change in the next version in case anyone else has a similar naming conflict.

    Any Unity logs should be visible on the Console tab when you open the debugger.
     
    Last edited: May 31, 2015
  33. spotavi

    spotavi

    Joined:
    Aug 30, 2014
    Posts:
    31
    Get this error in Unity 4.6.5 . Drag and drop the SrDebugger.init into the scene .

    NullReferenceException: Object reference not set to an instance of an object
    SRF.UI.FlashGraphic.OnEnable () (at Assets/StompyRobot/SRF/Scripts/UI/FlashGraphic.cs:29)
    UnityEngine.Object:Instantiate(Object)
    SRInstantiate:Instantiate(TriggerRoot) (at Assets/StompyRobot/SRF/Scripts/Helpers/SRInstantiate.cs:8)
    SRDebugger.Services.Implementation.DebugTriggerImpl:CreateTrigger() (at Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/DebugTriggerImpl.cs:76)
    SRDebugger.Services.Implementation.DebugTriggerImpl:set_IsEnabled(Boolean) (at Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/DebugTriggerImpl.cs:26)
    SRDebugger.Services.Implementation.SRDebugService:.ctor() (at Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/SRDebugService.cs:101)
    System.Activator:CreateInstance(Type)
    SRF.Service.SRServiceManager:DefaultServiceConstructor(Type, Type) (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:389)
    SRF.Service.SRServiceManager:AutoCreateService(Type) (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:347)
    SRF.Service.SRServiceManager:GetServiceInternal(Type) (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:85)
    SRF.Service.SRServiceManager:GetService() (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:37)
    SRDebug:Init() (at Assets/StompyRobot/SRDebugger/Scripts/SRDebug.cs:23)
    SRDebugger.SRDebuggerInit:Awake() (at Assets/StompyRobot/SRDebugger/Scripts/SRDebuggerInit.cs:27)
     
  34. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @spotavi,

    That looks like the references between prefabs have been lost somehow. Can you try deleting the StompyRobot folder and reimporting the package? If it still comes up with the error, I've had someone mention that using Perforce in their project seemed to cause a problem like this. They worked around it by importing the package into an empty project and copying the files over to their main project. (Make sure visible .meta files is enabled so the asset IDs carry over correctly).

    Let me know if that helps.
     
  35. B16B0SS

    B16B0SS

    Joined:
    Apr 29, 2014
    Posts:
    19
    Seconding crash. Currently getting the following on fresh import. I'm using Mercurial, but haven't added this imported code to the repo yet.


    NullReferenceException: Object reference not set to an instance of an object
    SRF.UI.FlashGraphic.OnEnable () (at Assets/StompyRobot/SRF/Scripts/UI/FlashGraphic.cs:29)
    UnityEngine.Object:Instantiate(TriggerRoot)
    SRInstantiate:Instantiate(TriggerRoot) (at Assets/StompyRobot/SRF/Scripts/Helpers/SRInstantiate.cs:8)
    SRDebugger.Services.Implementation.DebugTriggerImpl:CreateTrigger() (at Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/DebugTriggerImpl.cs:76)
    SRDebugger.Services.Implementation.DebugTriggerImpl:set_IsEnabled(Boolean) (at Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/DebugTriggerImpl.cs:26)
    SRDebugger.Services.Implementation.SRDebugService:.ctor() (at Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/SRDebugService.cs:101)
    System.Activator:CreateInstance(Type)
    SRF.Service.SRServiceManager:DefaultServiceConstructor(Type, Type) (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:389)
    SRF.Service.SRServiceManager:AutoCreateService(Type) (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:347)
    SRF.Service.SRServiceManager:GetServiceInternal(Type) (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:85)
    SRF.Service.SRServiceManager:GetService() (at Assets/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:37)
    SRDebug:Init() (at Assets/StompyRobot/SRDebugger/Scripts/SRDebug.cs:23)
    SRDebugger.AutoInitialize:OnLoad() (at Assets/StompyRobot/SRDebugger/Scripts/AutoInitialize.cs:18)

    EDIT:

    Noticed that all the uGUI components are missing. I also can't set those up manually as unity can't find things like "LayoutElement"
     
    Last edited: Jun 5, 2015
  36. B16B0SS

    B16B0SS

    Joined:
    Apr 29, 2014
    Posts:
    19
  37. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Wow, that is bizarre. Thanks for posting that.

    Here is the workaround from that thread for anyone experiencing the same problem here:

     
  38. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Hi,
    I'm thinking about purchasing this asset, but I have a question regarding GC-allocs because I'm always a bit wary when it comes to UI assets.

    Does your asset use Unity's Legacy GUI system i.e. allocates memory on a per-frame basis to show a simple box?

    If not, then I will be using the asset.
     
  39. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @dreasgrech, yes, the asset uses the new Unity UI system that was introduced in Unity 4.6.

    I've tried to be very careful not to cause any memory allocations when the debugger is not actively being used. Right now, when the debugger is in the background or the user is not interacting with the UI there is a single 6B per-frame allocation (caused by the profiler). This is something I'll be looking to remove or at least make a user-setting (as not all users use the profiler) in a future update.

    When interacting with the UI (especially the console) there can be some GC allocations, which are unfortunately unavoidable when using the UI system.
     
    dreasgrech likes this.
  40. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey folks, version 1.2.0 of SRDebugger has been submitted to the Asset Store for approval. It includes some major new features, such as console docking, log collapsing, options sorting and bug-report popover.



    Here is the full changelog:

    1.2.0
    ----------

    New:
    - Dock console at the top of the screen. (open from the console tab, SRDebug API or keyboard shortcuts)
    - Collapse duplicate log entries (enable in settings)
    - Bug Report popover. Show bug reporter without granting access to the debug panel. Open via keyboard shortcut or the SRDebug API.
    - Added Sort attribute to sort items in options tab. (See SROptions.Test.cs for examples)
    - Added SROptions PropertyChanged support. Call OnPropertyChanged() in your setters and pinned options will update to reflect the new value.
    - Entry code can now be entered with keyboard.

    Changes:
    - Sending screenshot with bug report now supported on web player.

    Fixes:
    - Fixed pin entry canvas not using correct UI camera.
    - Modified namespaces and naming of internal classes to reduce conflicts with other assets.
    - Fixed script updater having to run for Unity 5.1
    - Misc bug fixes
     
    Last edited: Jun 17, 2015
    dreasgrech and tosiabunio like this.
  41. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Thanks for your reply. It's great that it's using Unity 4.6's new UI System with minimal gc-allocs when not in use.

    Will definitely be purchasing.
     
    Simie likes this.
  42. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger 1.2 is now available on the Asset Store!

    My thanks to the asset store team for the quick approval. :)
     
  43. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Purchased the asset and trying it out at the moment.

    Is there a way how to show read-only properties in the Options though? The system doesn't seem to pickup public properties that don't have a setter.
     
  44. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @dreasgrech, thanks for purchasing!

    The code that scans for properties specifically filters out read-only properties. I didn't think that there would be much use for them at the time, though now with the OnPropertyChanged callback in 1.2.0 I can see it would be useful to be able to pin a read-only property to visualise a variable changing during gameplay. I'll add a note to the roadmap and see what I can do there.

    For now, if you just have a setter that does nothing it will appear in the options panel (though editing it will have no effect, of course).
     
  45. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Thanks for your reply.

    Yea, for now I'm working around it with empty setters. I was planning to use a category in the Options panel for displaying network data like sent and received bytes etc...
     
  46. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    On second thought, now that I actually tried it, the Options panel won't work for something like a network traffic monitoring label which is constantly updated, since the panel seems to be only fetching the value from the public property once when the panel is shown :(
     
  47. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @dreasgrech,

    If you call SROptions.Instance.OnPropertyChanged it will update to the new value.

    My recommendation would be to set the bytes in/out value from your networking code like this...

    SROptions.Instance.NetBytesIn = newValue;

    instead of using the SROptions property to look it up. That way you can implement OnPropertyChanged into your setter.

    Code (CSharp):
    1. private int _netBytesIn;
    2.  
    3. [Category("Net")]
    4. public int NetBytesIn {
    5.     get { return _netBytesIn; }
    6.     set {
    7.         _netBytesIn = value;
    8.         OnPropertyChanged("NetBytesIn");
    9.     }
    10. }
    If you don't use OnPropertyChanged, the displayed values will update whenever you visit the options tab.
     
    dreasgrech likes this.
  48. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    @Simie
    Sweet, that seems to do the trick. Guess my purchase was very timely regarding OnPropertyChanged in 1.2! :)

    If I may propose a feature request (other than the read-only properties one), is to have a custom Attribute for the Properties and Methods in SROptions that accepts a Display Name which would be shown as the option title in the Options Panel, rather than using the property name itself with "memberInfo.Name".
     
    Simie likes this.
  49. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I've added a DisplayName attribute to the roadmap :)

    A trick that might help you for now, if the property has the category name prefixed to it (e.g. a property called NetBytesIn in the Net category), the Net part will be removed.
     
    dreasgrech likes this.
  50. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Great, looking forward to the new features!

    For now, regarding the Display Name of Properties, I added a quick method call in OptionControlFactory.cs for adding spaces in my PascalCase property names ("n") before the call to instance.Bind(...) and it seems to be working.
     
    Last edited: Jun 12, 2015
    Simie likes this.