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
    Thanks for the heads up - I will get this fixed.
     
  2. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey, this isn't possible I'm afraid. The SROptions object is only created at runtime and has no support for serialization.

    If you like, you could implement your own system for editing ScriptableObjects in the editor and then add them to the Options tab yourself using the API: https://stompyrobot.uk/tools/srdebugger/documentation/#options_containers_api
     
  3. Binary42

    Binary42

    Joined:
    Aug 15, 2013
    Posts:
    207
    Hi, what is the current status/solution for the stripping problem?
     
  4. unity-freestyle

    unity-freestyle

    Joined:
    Aug 26, 2015
    Posts:
    45
    Oh hi!

    I'd like to know if there is a way to forcefully expand the option node to match it's display name or content.

    Right now I have some options like
    [DisplayName("Reconciliation Error Max Distance")]
    and
    [DisplayName("Reconciliation Error Threshold")]
    and they are being truncated, like in the attached screenshot.

    Great plugin by the way :)

    Thanks!
     

    Attached Files:

  5. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    Hi, was notch support ever added? Any suggestions to fix this?
     
  6. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Hey @Simie, is there an ETA on the next update?
     
  7. ExcaliburGames

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    50
    Hi, I'm thinking about using this great asset in my game, but I have one question:
    Does this asset add to build only when "Development build" enabled ? and if it possible ?
     
  8. MonkeyDevD

    MonkeyDevD

    Joined:
    Feb 28, 2018
    Posts:
    13
    E-mailed this as well, but thought it would be nice to share my thoughts on the forum as well.

    We have a whole stack of standard cheats and an even bigger list of cheats for QA purposes.
    We could make all these togglable by category (adding additional options to show/hide a container), but it would be so much easier to just move them to separate option tabs.

    I already checked, editing the prefabs is easy enough, and with some code-hooks I could filter out certain SROptions or custom containers (by using attributes) to move specific ones to new tabs.
    But this would need to be redone manually after every update.

    Some kind of plugin support would be awesome here. Injecting multiple tabs with specialized tabs.

    Placing an Attribute on the container class(es) would be an elegant way of selecting which options go to which tab (and might even allow options to appear on multiple tabs).

    Code (CSharp):
    1.  
    2. // this would be awesome!
    3. [Category("Example"), SROptionsTab("Options"), SROptionsTab("Some Other Tab")]
    4. public void ThisShowsOnDefaultAndSomeOtherTab()
    5. {
    6. }
     
    JustAnotherDude likes this.
  9. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi everyone, sorry for the delay in replying.



    I think I replied to your email with the same request already, but for everyone else: I intend to add an override the max length displayed in the options menu if the name is set manually via attribute.

    Are you experiencing a specific problem? I am not aware of any current issues with stripping (IL2CPP).

    This is still a work in progress I'm afraid - I will be working on a new update over the holidays that will hopefully include this feature.
    I am planning to make time over the holidays to work on the backlog of feature requests and bug fixes that have been reported. Are you waiting for any features in particular?

    At the moment SRDebugger is included in all builds of your game, however you can configure how the panel is opened so it is not accessible in non-debug builds if you wish.

    More options for stripping out SRDebugger from release builds has been frequently requested and is one of the major features I will be working on next.
    Hey, I just replied to your email, sorry for the delay on that. More organisation options has been a frequently requested feature and it is on our roadmap to add more ways to arrange and organise options. I can't provide an ETA for this feature at this time, but it is definitely something we're interested in doing.




    Sorry again everyone for the delay in replying! Hope you are all staying safe.
     
  10. Masao-Taya

    Masao-Taya

    Joined:
    May 16, 2017
    Posts:
    11
    Hi, Thanks for this great tool!
    But I have a trouble in the latest version of SRDebugger.

    I set Default Tab to "Options" in the SRDebugger settings window, but the "Console" tab opens when SRDebugger activate everytime.

    Please let me know if you have solutions for this problem.
    Thank you.
     
  11. Gigacee

    Gigacee

    Joined:
    Mar 4, 2015
    Posts:
    53
    Just a quick report - an error occurs when SRDebugger and Odin Inspector are used together.

    Unity 2019.4.15f1
    SRDebugger 1.9.1
    Odin Inspector 3.0.2

    1. Create a new Unity Project.
    2. Import SRDebugger and Odin Inspector.
    3. Close Unity Editor.
    4. Reopen Unity Editor.
    5. Play the scene.
    6.
    [SRDebugger] Error loading trigger prefab
    appears.

    If this is a problem on Odin Inspector's side, no action is needed. Thank you!
     
  12. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey - this issue was reported recently and I have a fix ready for the next update. If you would like get a fix ASAP, please replace the file at Assets\StompyRobot\SRDebugger\Scripts\UI\Other\ErrorNotifier.cs with the attached .cs file.

    This is really odd. I'm not sure how Odin works under the hood, but the prefab is being loaded in the 'normal' Unity way so I can't think of anything unique that SRDebugger does that any other prefab in Unity wouldn't also be doing. I tried opening up the Odin "Serialization Debugger" to see if it would have an issue with the script on the trigger but it says all is fine. I think I have to chalk this up to a bug with Odin I'm afraid.
     

    Attached Files:

  13. Gigacee

    Gigacee

    Joined:
    Mar 4, 2015
    Posts:
    53
    Thank you for your checking and response! I will report this to Odin.
     
  14. Masao-Taya

    Masao-Taya

    Joined:
    May 16, 2017
    Posts:
    11
    Hi, Thank you for early provide the fixed script.
    I could solved this issue by replace the file!
     
  15. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216

    Mostly waiting for the SROptions Editor Window to update dynamically whenever you add/remove containers by code :)
     
    Simie likes this.
  16. battman00

    battman00

    Joined:
    Mar 28, 2020
    Posts:
    10
    When using `SRDebug.Init()`, the SROptions window within Unity isn't populated. Is there a way to populate the window without having to close & reopen? Thanks!
     
  17. battman00

    battman00

    Joined:
    Mar 28, 2020
    Posts:
    10
    Hacky workaround: Inside the file "SROptionsWindow.cs", I added:

    Code (CSharp):
    1. if (EditorApplication.isPlaying && (_options == null || _options.Count == 0))
    I'm still curious if there's a proper solution though. Thanks :)
     
  18. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Hi, is there any update on future UI Toolkit support? Or workarounds outside of disabling all game/app UI when in the SR Debugger console (which works OK but doesn't help with the overlays)?
     
  19. DuncanMJA

    DuncanMJA

    Joined:
    Jul 18, 2012
    Posts:
    7
    Hi @Simie - any news on the support for Unity.InputSystem you mentioned back in April? We've implemented @zhuchun's workaround from above for the keyboard shortcuts but can't interact with the UI via the mouse, severely limiting the usefulness of the asset.

    Any news or pointers would be appreciated. Thanks.
     
  20. Newcomma

    Newcomma

    Joined:
    Feb 10, 2015
    Posts:
    89
    Helllo! Couple of quality of life features in the debug console that would be incredibly useful:

    1.) Copy & Paste for the logs in the console, right now ctrl/command+c does nothing, so often we end up sharing screenshots which is a lot slower
    2.) "Open Log File / location" button for Player builds (windows/mac) again we often share these files when we hit a bug - it's a feature the unity developer console has as well.

    Love the asset in general though! Thank you for maintaining it as well
     
    Simie likes this.
  21. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Here's the fix for the Options EditorWindow not updating:
    upload_2020-12-28_11-45-10.png
     
    Simie likes this.
  22. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216

    @Simie for the copy paste feature, I think it would be realistic if you could provide a callback when clicking on a log entry. Then we could implement our own solution without modifying the plugin code.
     
    Simie likes this.
  23. Newcomma

    Newcomma

    Joined:
    Feb 10, 2015
    Posts:
    89
    Ended up doing a quick fix for this locally

    143_29.png
     
  24. vivek599

    vivek599

    Joined:
    Sep 27, 2019
    Posts:
    25
    Hi guys,

    how can we have scroll bars and scrolling in a particular section in options tab. i am not sure how to add content of partial class to scroll area.

    basically i want to add scrolling feature in following section named MapStatus in options tab.
     

    Attached Files:

  25. DuncanMJA

    DuncanMJA

    Joined:
    Jul 18, 2012
    Posts:
    7
    This is starting to feel like a dead asset now. No integration of core new unity tech, no support responses for nearly a month.

    @Simie are you able to confirm what your intentions are for the future of this asset? If you're not going to support the new Input System imminently (either via an asset update or providing help here) perhaps you could make this clear in the asset store description?

    I respect your right to choose this path but think it would be more fair to make this clear up front. I'm currently regretting my purchase as the asset is incompatible with my project.
     
  26. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @DuncanMJA. This asset will be updated to support the new input system. I wasn't aware that there were issues with mouse support using the posted workaround otherwise I would have prioritized updating SRDebugger with official support for this.

    Regarding future updates, as mentioned I am working on bringing support for the new input system as well as bug fixes for all the issues posted in this thread. I intend to keep SRDebugger updated to work on the latest version of Unity for the foreseeable future. I apologize for the lack of updates on this thread over the past month, this year has been particuarly difficult due to real-life circumstances but I will try and keep this thread more up to date in future.

    Here is a preview of changes/fixes coming in the next update:

    Features:
    - New API: Custom "options containers" that can dynamically add/remove options at runtime without using reflection (i.e. no underlying C# property/method for each option).
    - Support for new Unity Input System.

    Changes:
    - Added option to disable taking screenshot when making a bug report.
    - Optimisations for options menu.

    Fixes:
    - Update SROptions window in editor when using SRDebug.Init()
    - Fix errors relating to "domain reload" when entering play mode in editor.


    As well as the above, I am looking to include the following in the next update:
    - Support for stripping SRDebugger from release builds (enable/disable SRDebugger in unity editor)
    - API for custom bug reporter web services (allow developers to replace the SR bug report service while keeping the same UI)
    - Additional features for sorting options (tabs, collapsable categories)
    - Copy callback for selected console item.

    If you would like to request a refund then I fully understand, you can get in touch with Unity and cc our email address (contact@stompyrobot.uk) and I will approve it for you.
     
  27. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I am investigating this. The runtime UI Elements package appears to still be in preview, so any update will likely be once it is finalized and I'm able to see how much work it is likely to be to convert over.

    Hey, I'm not quite sure what you mean by this. Are you asking if it's possible to have horizontal scrolling within an options category?
     
    Huacanacha likes this.
  28. DuncanMJA

    DuncanMJA

    Joined:
    Jul 18, 2012
    Posts:
    7
    @Simie thanks. I appreciate the reply and that there are many crazy things going on right now. So I hope my post landed with the respect with which it was intended.

    I don't wish to request a refund and would rather support what looks like an excellent asset. So I'll hang on and wait but any pointers you can offer in the meantime to hack mouse support would be much appreciated and/or an ETA for the next release if possible.

    I hope IRL isn't being too punishing. Roll on the spring…!
     
  29. Newcomma

    Newcomma

    Joined:
    Feb 10, 2015
    Posts:
    89
    Sorry to hear about your personal circumstances, +1 to hoping the toll it's taking is manageable. And just to say, this asset is an invaluable part of my developer toolset and has been for the last few years which I continue to introduce new studios and developers to.
     
  30. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Thanks both - your support is much appreciated. Here's to a more (hopefully) more normal 2021!

    Just to double check - this final step of the workaround should be what enables mouse support under the new input system:

    (offical docs: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/UISupport.html )

    I'm able to get mouse support in Unity 2020.1.13 using the new input system with an InputSystemUIInputModule in the scene. Does this work for you?

    The next update should be ready in a few weeks, possibly sooner. I don't foresee any major blockers on the horizon.

    Cheers,
    Simon
     
  31. cova8bitdots

    cova8bitdots

    Joined:
    Sep 30, 2019
    Posts:
    8
    Hi, we use SRDebugger for development our app.
    But there is a bug which is not visible from console window of SRDebugger, but is only visible by adb logcat.
    The error message is like this.

    ```
    UnityException: get_realtimeSinceStartup can only be called from the main thread.
    Constructors and field initializers will be executed from the loading thread when loading a scene.
    Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
    at SRDebugger.UI.Other.ErrorNotifier.ShowErrorWarning () [0x00000] in <00000000000000000000000000000000>:0
    at SRDebugger.Services.ConsoleUpdatedEventHandler.Invoke (SRDebugger.Services.IConsoleService console) [0x00000] in <00000000000000000000000000000000>:0
    at SRDebugger.Services.Implementation.StandardConsoleService.UnityLogCallback (System.String condition, System.String stackTrace, UnityEngine.LogType type) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Application+LogCallback.Invoke (System.String condition, System.String stackTrace, UnityEngine.LogType type) [0x00000] in <00000000000000000000000000000000>:0
    at System.UnhandledExceptionEventHandler.Invoke (System.O
    ```

    When we face to an error, ErrorNotifier.ShowErrorWarning() is called from Application.logMessageReceivedThreaded.

    We hope to you to fix this bug in future update.
    Thanks.
     
  32. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456

    Hi, this error was reported before and a fix was included in 1.9.1:

    Can you confirm if you are using 1.9.1 or not? If you are on 1.9.1 and still seeing this error, please let me know and I will investigate.
     
  33. cova8bitdots

    cova8bitdots

    Joined:
    Sep 30, 2019
    Posts:
    8
    Oh, we're sorry that we use v1.9.0 .

    We'll update version and try to check the behaviour.

    Thanks
     
  34. vivek599

    vivek599

    Joined:
    Sep 27, 2019
    Posts:
    25
    yes, any of entry in options tab need to be in a scroll view with scroll bars...
     
  35. DuncanMJA

    DuncanMJA

    Joined:
    Jul 18, 2012
    Posts:
    7
    @Simie no, unfortunately not. Maybe it's because I'm using UIElements/UIToolkit for the UI. I'll play with it a bit more and see if I can get it working.

    Thanks
     
  36. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I see - so would an option to set an individual category as "scroll" instead of the default "wrap" behaviour be okay? That shouldn't be too hard to implement for the next update.

    I'll look into this myself soon, but could it be that there is some transparent background element in your UI that is blocking/consuming input events?
     
  37. vivek599

    vivek599

    Joined:
    Sep 27, 2019
    Posts:
    25
    yes...
     
  38. diego_unity680

    diego_unity680

    Joined:
    Apr 17, 2020
    Posts:
    2
    I struggle to understand if SR Debugger removes the code for a release version or not.
    Keeping debugging code (even if the panel is disabled or invisible) is not safe.
    A malicious user could use it to access functions meant to be private.

    Cheers,
     
  39. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    Just imported SR Debugger into a new project. Same problem exists.
    My fix was to add this to Hierarchy.cs.
    Code (CSharp):
    1. [RuntimeInitializeOnLoadMethod]
    2. private static void Initialise()
    3. {
    4.     Cache.Clear();
    5. }
     
  40. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey, this is coming in the next update!

    This issue will be fixed in the next release, sorry for the delay.
     
    Shinyclef likes this.
  41. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey guys, just a quick update on the next release, which is currently targetted for mid-February.

    Here is the current expected changelog:

    Features:
    - New API: Custom "options containers" that can dynamically add/remove options at runtime without using reflection (i.e. no underlying C# property/method for each option).
    - Support for new Unity Input System.
    - Editor UI and script API for enabling/disabling SRDebugger. This enables you completely remove SRDebugger from builds of your game without uninstalling the plugin.



    Changes:
    - Added option to disable taking screenshot when making a bug report.
    - Optimisations for options menu.

    Fixes:
    - Update SROptions window in editor when using SRDebug.Init()
    - Fix errors relating to "domain reload" when entering play mode in editor.

    The other potential features I've mentioned in my previous post are not forgotten or cancelled. I'll be working on them straight away after this update is out, I just wanted to get this update out sooner rather than later as it contains some essential bug fixes.

    Cheers,
    Simon
     
    Revolter and tosiabunio like this.
  42. FeboGamedeveloper

    FeboGamedeveloper

    Joined:
    Feb 2, 2014
    Posts:
    47
    Hi I have a problem. In certain scenes I load and unload options pages (tunning). The problem is when I destroy an options page it brings me this bug, why?

    P.S: I actived the label: I enable the unload whe closed option.

    MissingReferenceException: The object of type 'CategoryGroup' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    SRDebugger.UI.Tabs.OptionsTabController.Clear () (at Assets/Other Assets/StompyRobot/SRDebugger/Scripts/UI/Tabs/OptionsTabController.cs:340)
    SRDebugger.UI.Tabs.OptionsTabController.OnOptionsUpdated (System.Object sender, System.EventArgs eventArgs) (at Assets/Other Assets/StompyRobot/SRDebugger/Scripts/UI/Tabs/OptionsTabController.cs:81)
    SRDebugger.Services.Implementation.OptionsServiceImpl.OnOptionsUpdated () (at Assets/Other Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/OptionsServiceImpl.cs:92)
    SRDebugger.Services.Implementation.OptionsServiceImpl.RemoveContainer (System.Object obj) (at Assets/Other Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/OptionsServiceImpl.cs:77)
    SRDebugger.Services.Implementation.SRDebugService.RemoveOptionContainer (System.Object container) (at Assets/Other Assets/StompyRobot/SRDebugger/Scripts/Services/Implementation/SRDebugService.cs:166)
     
  43. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi, thanks for reporting this issue. There will be a fix in the update this month. In the mean time you can fix this error by adding this to the OptionsTabController class:
    Code (CSharp):
    1.  
    2.        protected override void OnDestroy()
    3.         {
    4.             if (Service.Options != null)
    5.             {
    6.                 Service.Options.OptionsUpdated -= OnOptionsUpdated;
    7.             }
    8.  
    9.             if (Service.PinnedUI != null)
    10.             {
    11.                 Service.PinnedUI.OptionPinStateChanged -= OnOptionPinnedStateChanged;
    12.             }
    13.  
    14.             base.OnDestroy();
    15.         }
    16.  
     
    Last edited: Feb 12, 2021
  44. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi everyone, SRDebugger version 1.10.0 has been released. The documention will be updated in the next few days to explain the new options container feature + enable/disable SRDebugger. The disable feature is accessible from the SRDebugger settings window, in the 'advanced' tab.



    1.10.0
    ----------

    ** Minimum supported version is now 2018.4 **

    Features:
    - New API: Custom "options containers" that can dynamically add/remove options at runtime without using reflection (i.e. no underlying C# property/method for each option).
    - Support for new Unity Input System.
    - (Experimental) Editor UI and script API for enabling/disabling SRDebugger. This enables you completely remove SRDebugger from builds of your game without uninstalling the plugin.

    Changes:
    - Added option to disable taking screenshot when making a bug report.
    - Performance improvements for options tab when there are many option values changing frequently.

    Fixes:
    - Update SROptions window in editor when using SRDebug.Init()
    - Fix errors relating to "domain reload" when entering play mode in editor.
    - MissingReferenceException when using options containers while debug panel is unloaded.
    - Prevent trigger from taking input focus via navigation events.
    - Fix access to Unity property from background thread.
     
    Last edited: Feb 15, 2021
    Revolter and tosiabunio like this.
  45. SocialFreak

    SocialFreak

    Joined:
    Dec 12, 2015
    Posts:
    37
    Awesome asset, been using it for years and thanks for the update. Hardly used the screenshot so nice to have that option to remove.

    Is it possible, when an app crashes to send/save the log. Sometimes you get that initial crash on the device but not in the editor and it can take a bit to figure it out unless you have the info.
     
  46. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    This is a bit tricky as it would require custom handling per-platform. Unity has a built-in API for iOS but it's not enabled by default:https://docs.unity3d.com/ScriptReference/CrashReport.html As far as I am aware there is no equivelant for Android so a native plugin would likely be required there.

    As a result of the inconsistent support per-platform I don't see this being supported in the near future I'm afraid. My apologies!

    There are a few options here:
    1. Create your own options class in your asmdef and register it via the API: https://stompyrobot.uk/tools/srdebugger/documentation/#options_containers_api
    2. Create an asmdef for the SROptions folder and reference it from your assembly. The limitation here is that the SROptions class would not be able to access any of your classes, so interactions are limited to one direction.

    Hopefully this helps.
     
  47. lastone-iv

    lastone-iv

    Joined:
    Jan 13, 2020
    Posts:
    1
    1.10.0 Contains bug with OptionDefinition.Create

    upload_2021-3-24_15-1-8.png

    The way the getter is created is wrong and generates an
    InvalidCast
    exception when I try to create a boolean property
    Error is generated in the
    PropertyReference.GetValue
    method where the getter returns delegate, instead of property value.
    Quickfix for everyone who get this error is to replace
    () => getter
    with
    () => getter.invoke()
    . It's maybe hacky, but works.

    upload_2021-3-24_15-10-1.png
     
    meross likes this.
  48. glumleaf

    glumleaf

    Joined:
    Jan 30, 2016
    Posts:
    22
    Sorry if this issue has already been brought up, but I'm having a problem where my SRDebugger settings are getting reset whenever I go to Window > SRDebugger > Settings Window. Occasionally the Settings Window won't open at all, and instead I'll get this error:
    If I directly modify the settings asset, then my settings appear to save properly. It's only when I open the Settings window that they reset and I occasionally get this error. Again, sorry if this has already been mentioned!
     
  49. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Thank you for reporting this - I will include a fix in the next update.
    Oh, this sounds pretty bad. Can you let me know which version of Unity you are using?
     
  50. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    It seems like it now supports all platforms except tvOS. Just tested it on my iPhone, no issues there.