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. robertwahler

    robertwahler

    Joined:
    Mar 6, 2013
    Posts:
    43
    SRDebugger looks like a nicely engineered system. I'd love to use it on Apple TV. Can you drive the UI using just a controller? I tried driving the web demo with just a keyboard. It seems to almost be there, just needs a few visual queues as to what UI element has the focus.

    I'm also interested in a debugging system that can handle text input (think "~" console in Quake like FPS games). For example, I want to start a new game with a given seed. I'd like to hit the console hotkey ~, and type "game new FFDDE3" and hit enter.

    A combination of https://github.com/proletariatgames/CUDLR for remote commands plus C# attribute discovered console input methods and SRDebugger's slick UI would really be very useful.
     
  2. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    The build of my game using SRDebugger with default settings is including a 16MB (!) image that doesn't appear to be used. I deleted the file and the debugger seems to function just fine. You might want to look into this. The default import settings are 4096x4096 Truecolor.

    Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/DemoSprite.png

    Unity 5.2.3f1 with SRDebugger 1.4.4, Windows stand alone x86 development build (although I doubt that matters).
     
  3. olonge

    olonge

    Joined:
    Sep 22, 2014
    Posts:
    16
    Hi is there a way of determining minimum set of folders to be included in a dev build. It won't really be nice to have to keep a list of files to delete, modify texture etc, after every upgrade, re-install.
    Otherwise, it is an excellent app.

    Used Assets and files from the Resources folder, sorted by uncompressed size:
    16.0 mb 56.9% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/DemoSprite.png
    62.0 kb 0.2% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/WelcomeLogo_LightBG.png
    62.0 kb 0.2% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/WelcomeLogo_DarkBG.png
    60.1 kb 0.2% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/Logo_LightBG.png
    60.1 kb 0.2% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/Logo_DarkBG.png
    14.4 kb 0.1% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/BG_Light.png
    14.4 kb 0.1% Assets/StompyRobot/SRDebugger/Editor/Resources/SRDebugger/BG_Dark.png
     
    Last edited: Jan 3, 2016
  4. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Oh, no! That DemoSprite.png (and the other editor resources) are not supposed to be included in builds. I will definitely have that fixed in the next update. Many apologies for that @NunSuperior and @olonge, thanks for noticing the problem. DemoSprite.png is only used in the Welcome window so is safe to delete if you don't open that window.

    @robertwahler, thanks for your interest. I don't currently have any plans for refining the interface for controller input. From some quick testing it works acceptably apart from scrolling, which is a fairly difficult problem for me to solve I think. At the moment there is no console command input, but I am considering a system like that for a future update. No promises or ETA yet, though.
     
  5. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I have just submitted SRDebugger 1.4.6 to the asset store. SRDebugger 1.4.5 was released over the holidays and I didn't post the changelog, so I've included both 1.4.6 and 1.4.5 below.

    1.4.6
    ----------

    Fixes:
    - Editor resources used by SRDebugger are no longer included in builds.

    Known Issues:

    - On Unity 5.3.0f4, errors are printed when resizing the docked console and profiler. This is a Unity bug and should be fixed in a future Unity update. See http://issuetracker.unity3d.com/iss...t-transform-width-in-layout-element-component for details.

    1.4.5
    ----------

    Changes:
    - Added notice about known issue to Welcome window when running Unity 5.3
    - Unity 4.7 is now minimum supported version.

    Fixes:
    - Bug reporter signup form continues to the next page correctly after submitting.
     
  6. olonge

    olonge

    Joined:
    Sep 22, 2014
    Posts:
    16
    @ Simie
    Thanks for the quick turnaround. I'll have a look later to see the impact on builds.
    BTW, this is certainly one of my most favourite assets, up there with Si3

    and I've bought a lot of overhyped friend-reviewed unfinished stuff recently, but this is one of the genuinely useful assets out there.
    Kudos, Sir.
     
  7. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    1.4.6 is still pending approval so won't be live on the asset store yet. I can send you the build early if you PM me your email address :)

    Thanks for your kind words about SRDebugger, I'm glad you like it!
     
  8. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    146
    When I try to open de debugger (using the prefab option) in Unity 5.3.1f1 I get this error:

    Trying to add (Layout Rebuilder for) Buttons (UnityEngine.RectTransform) for layout rebuild while we are already inside a layout rebuild loop. This is not supported.
    UnityEngine.Canvas:SendWillRenderCanvases()


    Do I do something wrong or is this a bug?

    By the way I use the newest version (1.4.6)
     
  9. Simie

    Simie

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

    This is a bug with Unity 5.3.X at the moment. They have it listed in their issue tracker as fixed in a future update, but I have no idea when this will finally make it's way to a released build.

     
  10. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hello everyone, SRDebugger 1.4.6 has been approved and is now live on the Asset Store.

    1.4.6
    ----------

    Fixes:
    - Editor resources used by SRDebugger are no longer included in builds.

    Known Issues:
    - On Unity 5.3.0 and 5.3.1, errors about “Layout Rebuilder” are printed to the console while using SRDebugger. This is a Unity bug and should be fixed in a future Unity update. See this page for details.
     
  11. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    [Feature Request] for Pinned UI Layout, is it possible to allow custom position or dragging ?
     
  12. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @yuewahchan, you can customise which corners of the screen each pinned UI element occupies in the SRDebugger Settings window. (Window/SRDebugger/Settings Window). You can also resize the profiler and console by dragging the edges.
     
  13. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    I don't want to pin in the corner because it is occupied by the game UI.
     
  14. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Ah, I see. That is currently not supported, my apologies. I will add it to the roadmap to be considered for a future update, however.
     
  15. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
  16. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Is there a way to customize which panels are enabled at either build time or run time? I managed to get this working by changing your code, but I wanted to know if there's a more 'official' way of doing this?

    Code (CSharp):
    1. <Settings.cs>
    2.         public IList<DefaultTabs> DisabledTabs
    3.         {
    4.             get { return _disabledTabs; }
    5. //#if UNITY_EDITOR
    6.             set { _disabledTabs = value.ToArray(); }
    7. //#endif
    8.         }
    9.  
    10. <my code>
    11. SRDebug.Init();
    12.  
    13. #if !DEVELOPMENT_BUILD && !UNITY_EDITOR
    14.     SRDebug.Instance.Settings.DisabledTabs = new List<SRDebugger.DefaultTabs>(){SRDebugger.DefaultTabs.Console, SRDebugger.DefaultTabs.Options};
    15. #endif
     
  17. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    (Unrelated to the above question)

    I'd love to have an option to make the frame rate counter display at a constant speed regardless of frame rate. Right now at high frame rates (200+) the chart moves by really fast. I'm optimizing my game to run at 200+ fps on my dev machine and the chart is basically useless at that rate.

    Thanks!
     
  18. Simie

    Simie

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

    1. The DisabledTabs option usually has restricted access to prevent unexpected behaviour, as it is only checked once when the panel is first opened. Your workaround is fine as long as you make any changes before the panel is opened.

    2. The frame chart has a column per sample (frame). I'm not sure how having a constant rate would be useful since you'd be missing large amounts of data (or have huge gaps if below your target frame rate). Isn't it enough to lock your game to 60fps and compare the time the frame took to execute? Especially since frame-rate is a flawed measure.

    I hope this helps.
     
  19. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Thanks for the quick reply. I'll check out that FPS link.
     
  20. Cripple

    Cripple

    Joined:
    Aug 16, 2012
    Posts:
    92
    Hello,

    The PinEntryControl allocates memory every frame even when it is not displayed on the screen.

    It is the function Input.inputString that allocates. You should disable the component and prevent its update method call when the PinEntryControl is not displayed on screen.

    Cheers
     
  21. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Cripple, thanks for the heads up. I'll have that fixed in the next update.

    EDIT: Here is an updated PinEntryControl.cs file that you can use to fix the per-frame allocation.
     
    Last edited: Feb 9, 2016
  22. Cripple

    Cripple

    Joined:
    Aug 16, 2012
    Posts:
    92
    Hi

    I can see an improvement for your console. In fact if we run an application for a long time and if there are a lot of logs, the memory used to store all thoses messages will grow a lot. It is a problem for application that will run for a long time (it is the case for our application).

    You could setup a limit for messages directly accessible from the in game Console, and once you reach that limit, logs could be written within a file. The full log would be only accessible from the main debugger only if you click on a special button.
     
  23. Cripple

    Cripple

    Joined:
    Aug 16, 2012
    Posts:
    92
    Hi again,

    It could be nice to have the memory profiler dockable too.
    Talking about the memory profiler, there is an error with the reported value for "Mono Memory Usage" in a standalone Windows player. It reports 0. It works fine in editor.
     
  24. Simie

    Simie

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

    Your observation about the console is something I have been planning to improve for some time. It's likely in future I will convert it to use a CircularBuffer (and limit the console to ~500 messages or so, user configurable), and pool the rest in a file to be sent via the bug reporter.

    Re. the memory profiler reporting 0 for "Mono Memory Usage", this is a limitation of non-development builds of the Unity Player on Windows. There should be a message saying "Current usage is not supported for this build." under that section.

    EDIT: I just checked on the latest version of Unity, and this message is not appearing as it should be. I'll take a look into why that is. (It does appear on Unity 5.0.4f1). It should be showing the "Total" mono heap allocated, but not the "Current" mono heap used.
     
    Last edited: Feb 10, 2016
  25. Cripple

    Cripple

    Joined:
    Aug 16, 2012
    Posts:
    92
    Hey,

    Sometimes the TriggerButton is white instead of being transparent. I initialize the Debugguer using the SRDebugger.Init (disabled by default and enabled at runtime)
     
  26. Simie

    Simie

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

    Does this happen every time, and does it remain white when tapped?

    The trigger staying a solid white is a behaviour I've observed when the package failed to import correctly and some references to SRDebugger assets are lost due to the asset IDs changing.
     
  27. Cripple

    Cripple

    Joined:
    Aug 16, 2012
    Posts:
    92
    When I click on it, the trigger becomes transparent event. It is more a state error of the button i think, didn't check the code.
     
  28. bryanlewis

    bryanlewis

    Joined:
    Jan 13, 2013
    Posts:
    3
    Hi! I'm trying SRDebugger for the first time and it looks very useful. I came across a small bug; I think it's fairly harmless because it happens only in the Unity editor, not on devices.

    My initial scene has three canvases, one of which is activated when I want to show the main-menu loader panel. When I triple-click on the upper-left corner in that loader screen the SRDebugger doesn't appear. Instead I see four identical console messages:

    [StyleComponent] No active StyleRoot object found in parents.
    ... StyleComponent.cs:77
    ... StyleComponent.cs:29
    ... SRTabController.cs:56
    ... DebuggerTabController.cs:70

    After this, SRDebugger / Panel / Canvas is disabled in the hierarchy.

    I tried to reproduce it under various conditions.
    * After seeing the console messages, I loaded one of my normal game levels and the debugger appeared without another triple-click.
    * If I load a game level before doing the first triple-click the panel appears as it should.
    * It doesn't happen all the time, more like half the time in my quick tests. Just now it started working again, maybe because I did an iOS build beforehand? Oh well, hope some of this helps.
     
  29. Simie

    Simie

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

    That is very strange. Especially strange is that everything starts working once you leave that scene.

    Are there any scripts running on that scene that might be reorganising the hierarchy of SRDebuggers gameobjects, or enabling/disabling SRDebugger components? (e.g. any uses of FindObjectOfType<Canvas> or similar).
     
  30. bryanlewis

    bryanlewis

    Joined:
    Jan 13, 2013
    Posts:
    3
    Right you are! I was using FindObjectOfTypeAll<Canvas>.

    I realized after I sent my post that it was probably my code that was causing problems. I almost deleted my post, but when I tried removing my code it didn't fix the problem so I was back to confused.

    This morning I rewrote my code to avoid the FindObjectOfTypeAll and got into a state where SRDebugger wouldn't appear at all! I figured there must be some low-level caching going on somewhere, and re-imported SRDebugger. Now it's working flawlessly.

    I guess FindObjectOfTypeAll causes the canvases to awaken in an order they don't expect.

    Thanks!
     
  31. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Oh, well, that is very strange! I'm glad it's all working now. Thanks for purchasing :)
     
  32. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    862
    Hi! Great package unfortunately I get this message when tryingscene that comes with SRDebugger
    "Trying to add (Layout Rebuilder for) Content (UnityEngine.RectTransform) for layout rebuild while we are already inside a layout rebuild loop. This is not supported."

    it stops execution, what to do about this?
     
  33. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
  34. Kadaiyen

    Kadaiyen

    Joined:
    Jul 16, 2012
    Posts:
    14
    @Simie any plans for console support?
     
  35. young-xyz

    young-xyz

    Joined:
    Feb 23, 2015
    Posts:
    51
    I use good your program.

    Console Menu -> "Docked Tools"
    Logo show Top Screen...
    I could not see a new log because not automatically scroll down.
    I want to show a new log (automatically scroll down).
     
  36. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Kadaiyen, this is on the "wish list" but not planned/in progress yet.

    @young xyz, I'll see about fixing that in a future update. Thanks for the report.
     
  37. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    57
    Hi,
    First I would like to thank you so much for making this wonderful asset, it is extremely helpful and useful and well written.

    I am having a problem on android, I have an SRoptions file that works on iphone but is not working on android

    On iphone I need to click LoadFromPlayerPrefs button and then on to console back to options and data is there
    The data never appears on my android

    Also, sometimes the screen becomes very transparent looking or dim looking, weird android problem

    Code (CSharp):
    1. public void LoadFromPlayerPrefs(){
    2. Speed=PlayerPrefs.GetInt("Speed");
    3.  
    4.     }
    5.  
    6.     public void SaveToPlayerPrefs(){
    7.         PlayerPrefs.SetInt("Speed",Speed);
    8.     }
    9.  
    10.     int _Speed;
    11.     [Category("Movement"), Sort(1)]
    12.     [NumberRange(0, 10), Increment(1)]
    13.     public int Speed{
    14.         get{
    15.             return _Speed;
    16.         }  
    17.         set{
    18.             _Speed=value;
    19.         }
    20.     }
     
  38. Simie

    Simie

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

    I'm glad you like SRDebugger, thank you for the kind words!

    For your PlayerPrefs issue, I would try calling PlayerPrefs.Save() in your SaveToPlayerPrefs() method to see if that helps. There shouldn't be any SRDebugger-specific issue when using PlayerPrefs the way you are using it.

    I've never seen the dimming problem before, do you have a screenshot I could take a look at?
     
  39. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey folks, I've just submitted a new version of SRDebugger to the asset store for approval. It should be live in a few days. Changes are below as usual.

    1.4.7
    ----------

    New:
    - Trigger can now be positioned in CenterLeft, CenterRight, BottomCenter, TopCenter positions.
    - Options can now be positioned in TopCenter and BottomCenter positions.

    Changes:
    - Console now scrolls to the last log entry when first opened.
    - Moved "using" statements inside namespace to prevent conflicts with user code.
    - Renamed the hierarchy names of all prefabs to include an SR_ prefix to prevent conflicts with user code.

    Fixes:
    - Fixed input bug when using Unity 5.3.3p2.
    - Allocation per frame when pin entry form is visible has been removed.
    - Mono usage profiler correctly reports when not supported on 5.3+
     
  40. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey, SRDebugger version 1.4.7 has been approved and is now live on the asset store. It is a recommended upgrade for anyone using Unity 5.3.4+ as it has some fixes for changes in the UI system introduced in Unity 5.3.3p2.
     
  41. momo_the_monster

    momo_the_monster

    Joined:
    Sep 3, 2014
    Posts:
    16
    Is PlayerPrefs the best way to get persistence of Options?

    Code (CSharp):
    1. public int Port
    2.     {
    3.         get { return PlayerPrefs.GetInt("Port"); }
    4.         set {
    5.             PlayerPrefs.SetInt("Port", value);
    6.             PlayerPrefs.Save();
    7.             OnPropertyChanged("Port");
    8.         }
     
    Last edited: Apr 22, 2016
  42. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    It depends how often you are accessing the options. I'm not entirely sure of the performance of PlayerPrefs but;

    - What you have is fine if it's only accessed or saved sporadically.
    - If multiple times per frame, I would recommend loading all the properties in the constructor and returning that cached value in the getter.
    - If setting multiple times per frame I would suggest creating a "save" method that sets all the properties to PlayerPrefs (PlayerPrefs.SetInt etc) and calls PlayerPrefs.Save(). You could use a monobehaviour to hook into OnDisable/OnApplicationQuit and call this Save method from there.
     
  43. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    I just bought this tool to debug on my device since my game is crashing. Is there any way look at the log after it crashed ? SRDebugger no longer available after the game crash on the device. I am not able to look at the logs or is am I able to look at the adb logcat on the device ?

    Thanks
     
  44. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @kotor. Unfortunately there is no way to capture a crash of this kind with SRDebugger as it does not store the log after the application has been closed. And, unfortunately, if it did store logs between runs it wouldn't be able to catch a crash and store it before the application was terminated. I'd recommend using the target platforms native tools to try and track down this crash.
     
  45. mountblanc

    mountblanc

    Joined:
    Sep 24, 2015
    Posts:
    93
    Hi Simie, I have been using SRDebugger for a while now. I just was doing a test build on the windows 10 platform that i didn't do for a while and now I got an unhandled exception when trying to run my game:
    I have commented out all source codes that use SRDebugger and set the Debugger Disabled in the SRDebugger window but the error remains.
    I have removed SRDebugger and then the game is running without trouble. Then I added it again and the problem returned. (Both in release and debug builds , both on Phone and Windows Desktop )

    I am using SRDebugger 1.4.7 with Unity 5.3.4.P6 (When this problem started i was using 5.3.4 P4 but then I updated hoping this error would go away , With no luck )
     
  46. Simie

    Simie

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

    This is a bug with Unity. I submitted a bug report a few weeks ago, they confirmed that they can reproduce the crash and sent it to their developers for fixing. Hopefully they'll have this fixed in a future patch release. Sorry for the inconvenience.

    Simie
     
  47. mountblanc

    mountblanc

    Joined:
    Sep 24, 2015
    Posts:
    93
    Hi @Simie,

    Thanks for the info. p.s. Do you have by any change the link to the bug rapport so we can add some points to get it solved ?
     
  48. Simie

    Simie

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

    The case number is #789503, but I can't find a listing for it on the public issue tracker. It may have been set as private when I submitted the bug, I'm not sure.
     
  49. mountblanc

    mountblanc

    Joined:
    Sep 24, 2015
    Posts:
    93
    @Simie the latest release (5.3.5.f1) hasn't fixed the issue yet i am afraid so i guess we have to wait a bit longer. I noticed however if I set the Scripting Backend to IL2CPP (In the Windows project settings->Other Settings ) the project will run without problems on the Windows 10 platform with SRDebugger active.
     
  50. rubeng

    rubeng

    Joined:
    Apr 20, 2013
    Posts:
    58
    Hi, SRDebugger is awesome, and the options feature on device is making it way easier to test our game.

    For use in the unity editor, I feel that having to open the debug console or pinning stuff is either too much work when testing something repeatedly, or too invasive in the case of pinning so I was thinking that maybe a nice feature could be to have a unity editor window, that we could dock next to the game view and allow us to have a way to use the options feature that was automatic and simple to use on the editor but that still was possible to use on the mobile device.

    I could make something custom and just instantiate and use the same options class and reimplement buttons and labels to make the custom unity editor, but was interesting to know your feedback, and if you think it would be a cool feature to have on SRDebugger.

    Thanks.