Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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
    Yes, that'd be where I'd implement something like that. I'm happy it was clear enough for you to find it easily.

    Thanks again for purchasing!
     
  2. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    I noticed that the debugger is navigable with the WASD keys and also reads the Space key to activate the current selected control.

    Is there an option to turn this off? It's because I'm using WASD and Space in the game already and I need to be able to use them without interfering with the debugger.
     
  3. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @dreasgrech, disabling "Send Navigation Events" in your scenes Event System should prevent that from happening. If you don't have an Event System in your scene, you can modify the factory that SRDebugger uses to create the default one in SRDebugger/Scripts/Internal/Util.cs -> SRDebuggerUtil.CreateDefaultEventSystem().

    Something like this:

    Code (CSharp):
    1.         public static void CreateDefaultEventSystem()
    2.         {
    3.  
    4.             var go = new GameObject("EventSystem");
    5.             go.AddComponent<EventSystem>().sendNavigationEvents = false;
    6.             go.AddComponent<StandaloneInputModule>();
    7.             go.AddComponent<TouchInputModule>();
    8.  
    9.         }
     
    dreasgrech likes this.
  4. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    Thanks, that was exactly what I was looking for.
     
  5. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    I'm using Unity 4.6.6 and SR 1.2.0 and this is what I see:
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(72,102): error CS1061: Type `PropertyReference' does not contain a definition for `PropertyType' and no extension method `PropertyType' of type `PropertyReference' could be found (are you missing a using directive or an assembly reference?)
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(72,80): error CS1502: The best overloaded method match for `SRDebugger.UI.Controls.DataBoundControl.CanBind(System.Type)' has some invalid arguments
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(72,80): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Type'
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(76,131): error CS1061: Type `PropertyReference' does not contain a definition for `PropertyType' and no extension method `PropertyType' of type `PropertyReference' could be found (are you missing a using directive or an assembly reference?)
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(81,54): error CS0309: The type `object' must be convertible to `UnityEngine.Component' in order to use it as parameter `T' in the generic type or method `SRInstantiate.Instantiate<T>(T)'
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(92,42): error CS1061: Type `object' does not contain a definition for `Bind' and no extension method `Bind' of type `object' could be found (are you missing a using directive or an assembly reference?)
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(99,40): error CS1502: The best overloaded method match for `UnityEngine.Object.Destroy(UnityEngine.Object)' has some invalid arguments
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(99,40): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Object'
    Assets/StompyRobot/SRDebugger/Scripts/Internal/OptionControlFactory.cs(104,25): error CS0266: Cannot implicitly convert type `object' to `SRDebugger.UI.Controls.DataBoundControl'. An explicit conversion exists (are you missing a cast?)
    UNSUPPORTED

    Thank you.
     
  6. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @latas, it looks like there is another class in your project named PropertyReference. By any chance do you have NGUI imported in your project?

    I'll send you a replacement for OptionControlFactory that will explicitly use the PropertyReference class used by SRDebugger via PM.
     
    Last edited: Jun 13, 2015
  7. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    Great. Yes I'm using NGUI in my game.
     
  8. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    One more question. The main goal of this purchase, more than our own use, it is because we've got a bug in one of our game, that only happens by the way to some users. In fact the game when that happens doesn't mean a break or exit game. So what we want to do is sending the game to one of that users who is helping us to solve this, and retrieve from there a log. Can we do that something like that?
     
  9. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    Sorry to anticipate questions, but as you can guess, by the way, we're not able to build the game using your plugin :) so thank you very much to help us saving time.
     
  10. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @latas, PM sent. Let me know if that works for you.

    As for the log sending, yes, definitely! If you go the "Window/SRDebugger Settings" menu, you can activate bug reporter service (you'll need to get a free API key, but it's all explained in the settings panel). This will enable your users to send their system profile, console log and a screenshot to your email address.
     
  11. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    Cool!
     
  12. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    I got the API Key. Nice system guy :) Very well implemented. My concern about the issue looks to be the origin in some strange behaviour between x86 and ARM. It looks the users reporting the bug, all of them are using x86 instead ARM.
     
  13. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Glad you like it! I hope it helps you solve that bug. It sounds frustrating.
     
  14. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Version 1.2.1 has just been submitted for approval. Changelog:

    1.2.1
    ----------

    New:
    - Added DisplayName attribute for use with SROptions.

    Changes:
    - Read-only properties are now added to options tab (but can't be modified).
    - Sort attribute can now be applied to methods.

    Fixes:
    - Fixed compile errors when NGUI is imported in the same project.
    - Removed excess logging when holding a number button in options tab.
     
    Last edited: Jun 17, 2015
    dreasgrech and tosiabunio like this.
  15. BibaVentures

    BibaVentures

    Joined:
    Jan 22, 2015
    Posts:
    2
    We definitely got a whackload of errors on import. Making a fresh project, importing, and then copy and pasting along with visible meta files seemed to do the trick (probably forcing the library to refresh).

    We did also notice that it doesn't seem to entirely play nice with Visual Studio integration:

     
  16. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    I also use SyntaxTree's Visual Studio plugin, but it doesn't conflict at all with SRDebugger, or any other plugin.
     
  17. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @mattm_z2h, I also use the Visual Studio plugin. I usually see that error when it's trying to regenerate the Visual Studio project files after changing platforms, when I already have the project open in Visual Studio. Does the error still occur when you have Visual Studio closed?

    As for your importing problems, can I ask a few questions? I'm trying to pin down why this is happening only for some users.

    - Are you using a source control integration? (e.g. perforce, plastic)
    - Are you using NGUI in your project?
    - Do you have a note of what kind of errors you had? Were they compile errors or missing references at runtime?

    Thanks
     
  18. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey folks, 1.2.1 has been approved and is now live on the asset store.

    New:
    - Added DisplayName attribute for use with SROptions.

    Changes:
    - Read-only properties are now added to options tab (but can't be modified).
    - Sort attribute can now be applied to methods.

    Fixes:
    - Fixed compile errors when NGUI is imported in the same project.
    - Removed excess logging when holding a number button in options tab.
     
  19. dreasgrech

    dreasgrech

    Joined:
    Feb 9, 2013
    Posts:
    205
    #1 Is there a way of specifying the increment value for numerical Options? The problem is that currently floats are incrementing by 1 and that doesn't make sense if I have a range of say 0..1.

    #2 Would it be able possible to allow manual inputting of numbers for the Options? Currently although you are able to select the Option value and a caret appears next to the value, it doesn't manually let you input the value. The problem with this is that it's impractical for me to hold the '>' button to reach a value of like 10000.

    Thanks.
     
  20. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @dreasgrech

    #1 There isn't a way to specify the increment at the moment. The NumberRange attribute will handle restricting a value to a 0..1 range, though. Also, if you click and drag from side to side on an option you can finely adjust a value. (See the example on this page).

    #2 You should be able to manually input numbers. I just tested it on mobile and in the editor, and clicking on a number option will select the current number and allow you to input via the keyboard.
     
  21. miyacchi

    miyacchi

    Joined:
    Mar 27, 2015
    Posts:
    10
    It's quite great asset for development!

    I wanted to localize bug report view's message to be Japanese.
    But I couldn't that, Is the message might be in DLL?

    I hope you to add localize.
     
  22. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @miyacchi, great to hear that you're finding SRDebugger useful!

    If you mean the bug report form that is presented to the user, it should be in a prefab called BugReportSheet in the SRDebugger resources folder.

    I hope this helps. I'm on holiday until next week and don't have access to the files myself
     
  23. miyacchi

    miyacchi

    Joined:
    Mar 27, 2015
    Posts:
    10
    Thanks for quick response,
    I understood to localize the form in Japanese!

    Cheers
     
  24. neuecc

    neuecc

    Joined:
    Apr 20, 2014
    Posts:
    114
    Thank you, this is great asset!
    It includes all the things which I wanted.

    I have two requests.

    #1 Some framework codes does not use namespace(SRList, SRFGameObjectExtensions, etc...)
    Would you move to all codes under namespace?

    #2 Options Tab is great feature and thanks to the easy way for definition. Would you declare option from except SROptions class? ServiceManager scans all assembly, plaese scan options too. For example use [SROptionsAttribute] for marker.
     
  25. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @neuecc Hi, just replying to let you know I'm on holiday until Friday 24th and will respond when I get back.
     
  26. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey, back from holiday, sorry for the delay!

    #1 - Yes, I'll see about namespacing those for the next release.

    #2 - This one is a little tricky. Right now the SROptions class is the only scanned class as a sort of futureproofing for a feature I have planned (saving, loading and exporting SROptions values). It also has boilerplate code for instantiating and accessing the singleton object, which can't be guaranteed just by applying an attribute to the class.

    Is there a use case that requires you to have an additional options class?
     
  27. neuecc

    neuecc

    Joined:
    Apr 20, 2014
    Posts:
    114
    Thank you.

    > Is there a use case that requires you to have an additional options class?

    I want to share SROptions between some projects.
    Now I share .dll for common classes.
    Therefore I want to include SROptions to it but partial class can't over dll.

    The priority of this is very low, it does not need to implemented.
     
  28. neuecc

    neuecc

    Joined:
    Apr 20, 2014
    Posts:
    114
    Last day, Unity 5.2.0b5 was released and I tryed it with SRDebugger.
    Unfortunately view is broken...
    Just for your information.
     

    Attached Files:

  29. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @neuecc, the 5.2 beta has a few changes to how the UI system works. I'll definitely have it fixed in SRDebugger before the 5.2 final arrives. Thanks for letting me know.
     
  30. illustir

    illustir

    Joined:
    Dec 12, 2014
    Posts:
    24
    Once in a while I get a a NullReferenceException in SRDebugger which I can't place and it fills up my console with an infinite number of errors. I'm not touching SRDebugger at all. What could I be doing that makes it come up with such an error?

    Here's a picture (because for some reason screenshots of the thing come up blank).



    (No clue why it displays the image sideways either… All other views of the image have been right side up.)
     
  31. Simie

    Simie

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

    Does this occur only in the editor? This might happen if you make changes to code and Unity reloads the scripts while in play-mode.
     
  32. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Bug Report
    ----------------
    Hi,

    just bought your asset and it's working great on win, mac, android, but it crashes on Ipad Mini, and Ipad 4.
    When opening the options pane, it segfaults:
    throws SIGSEGV, on continue => throws EXC_BAD_ACCESS
    We haven't added stuff to the partial class, it just crashes as fresh import on the device when opening the option panel.

    Tested on unity 5.1.2 (current stable release), XCode 6.4

    We would need a fix asap, as we bought it for ipad dev....

    best,robert
     
  33. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @polycular, I've just tested it with Unity 5.1.2f1, XCode 6.3.1 and an iPad Mini 2 and can't reproduce the crash. I'm currently installing XCode 6.4 to see if I can reproduce it with that.

    It might be worth installing the latest patch release for 5.1.2 (currently patch 3, I think). They are always including more iOS/IL2CPP fixes so one of them might help with the problem.

    - Was there any message in the log before the crash that might indicate where something went wrong?
    - Are you using IL2CPP?
    - Do you have stripping enabled?
    - Do you have script call optimisation enabled?

    EDIT: Also, what version of iOS are you deploying too?
     
    Last edited: Aug 14, 2015
  34. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Hi,

    we are not using the patched versions, we will try it with p3 soon, not using il2cpp, no stripping, no script call opt, ios 8.4
    thx for your help, and a feature request, would be great to see the permissions set on the mobile device in the system panel, not sure if this can be achieved easily...

    best,robert
     
  35. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @polycular, does the same error occur if you deploy from a fresh project with SRDebugger installed, with the same iOS Player settings?

    Re your feature request, what kind of permissions would you like to see there? Anything that is accessible from the Unity scripting API can be integrated in the system tab, but I suspect some of the more advanced permissions would require native plugins to integrate.
     
  36. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Hi again,

    it works with IL2CPP.

    Permissions, basically what is written in the Manifest (Camera, Billing, External Write, ....)

    best,robert
     
  37. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @polycular, I've had a look to see how possible it might be to access that kind of information. Unfortunately without a native plugin it might be quite difficult. I'll keep an eye out for a way to access that data and will definitely add it to the system tab if I find a way.
     
  38. oTAMAKOo

    oTAMAKOo

    Joined:
    Jul 2, 2014
    Posts:
    1
    SRDebugger can limit the number of display characters?
    My StackTrace over 17000 characters text. SRDebugger cant show it. Here's the error:
     

    Attached Files:

  39. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @oTAMAKOo, I hadn't ever expected such a long stack trace! I'll add a limit in the next version.
     
  40. illustir

    illustir

    Joined:
    Dec 12, 2014
    Posts:
    24
    Another issue:

    We had a very odd bug happening in our project that was extremely hard to pinpoint. Sometimes it would happen, sometimes it wouldn't. The point is, we instantiate a script like this:

    this.gameObject.AddComponent<ReporterStory0>();
    And then it will just bug out on the first function that is called in it with something like this.

    NullReferenceException: A null value was found where an object instance was required.
    at ReporterStory0.Update () [0x00000] in <filename unknown>:0

    (Filename: currently not available on il2cpp Line: -1)
    Update is an empty function.

    After literally days of poking around at it, I finally figured out that this only happens if we have previously opened the SRDebugger overlay while testing (to check the log). If we hadn't touched it during that session, everything went fine. I've now torn out SRDebugger (which we were going to do for release anyway), but what the hell could have been happening here?
     
  41. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    That is really bizarre. I'm assuming this was on iOS with IL2CPP enabled?
    I had similar issues with iOS/IL2CPP months ago where the wrong class is reported for one thing or another (now patched). I have no idea why this would be happening only with SRDebugger open, though. I would suspect some kind of weird class name conflict, but there is no class in SRDebugger with that name. Hmm.

    Possibly the Update function being empty could be causing this, IL2CPP might be stripping it out then Unity still tries to call it? I'd be interested to see if the error still happened with the Update function removed entirely. That still doesn't explain why it only happens with SRDebugger open, but the best I've got for now.

    EDIT: Could I ask which Unity version you are using? I'd like to check over with the IL2CPP guys to see if they know what is going on.
     
    Last edited: Aug 19, 2015
  42. illustir

    illustir

    Joined:
    Dec 12, 2014
    Posts:
    24
    I removed all the Update() functions since they were empty and it was recommended to do so, but then it threw the null on the very next function that it encountered.

    I'm not 100% on this (can't really be with these kind of bugs), but I could most reliably reproduce this behaviour (and also some other weird behaviour where our layout was messed up) if we'd played with SRDebugger before and reliably not encounter it if we didn't touch it, so that's all I can go on for now.

    Yes, iOS, il2cpp, latest version of Unity (5.1.2f1).
     
  43. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Just wanted to let you know that with IL2CPP it is working on iOS and doesn't crash anymore...
    Not sure when we can test if it would run without IL2CPP in an empty project... but I tell u then, when we find some time...
    best,robert

     
  44. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    same problem with unity 5.2.0F1 corruped view, ...
     
  45. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @polycular, the update for SRDebugger to support Unity 5.2 will be submitted to the asset store in a few days. It'll be available before Unity 5.2 is officially released!
     
    polycular likes this.
  46. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    could we have a private sneak preview to the version once you got something, u can private msg me, thx...
     
  47. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Certainly. As soon as I package it up (eta one day) I'll send you the new version via PM.
     
    polycular likes this.
  48. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey folks, SRDebugger version 1.3.0 has just been submitted to the Unity Asset Store for approval. It should be up some time next week, well in advance of Unity 5.2 releasing in September. As usual, the changelog is below.

    1.3.0
    ----------

    New:
    - Profiler can now be docked. Enable by pressing the "pin" icon on profiler tab or via API (SRDebug.Instance.IsProfilerDocked), or via keyboard shortcuts
    - Resize docked profiler by dragging edges
    - Added IncrementAttribute for use with SROptions, used to specify how much a number will be incremented/decremented when buttons are pressed
    - Can disable specific tabs in SRDebugger settings
    - Added "Runtime" and "Display" categories to system tab (this information is also sent with bug reports)
    - Support for Unity 5.2

    Changes:
    - Namespace remaining code in SRF library to avoid conflicts. (If you're using any of this code you may need to import SRF namespace in your files)

    Fixes:
    - Fixed opacity on docked console not resetting after failed resize drag
    - Truncate long log messages to improve performance and prevent UGUI errors
     
    y.kawai and tosiabunio like this.
  49. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Hi,

    is there an easy solution to set pin mode of options in code? So in our dev branch the options often used are pinned down as buttons as default, so not everyone has to open gui and pinned it himself, specially for beta testers this would be nice.
    best,robert
     
  50. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi Robert (@polycular),

    No public API, but we can use the same internal API that the options tab uses (though this interface may change in the future).

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Linq;
    3. using SRDebugger.Internal;
    4.  
    5. public class TestPinOptions : MonoBehaviour
    6. {
    7.  
    8.     void Start()
    9.     {
    10.  
    11.         var desiredOption = Service.Options.Options.FirstOrDefault(p => p.Name == "TestFloat");
    12.         Service.PinnedUI.Pin(desiredOption);
    13.  
    14.     }
    15.  
    16. }
     
    Last edited: Aug 24, 2015