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
    Hi @rubeng,

    Thanks for the kind words, I'm glad you are finding SRDebugger useful.

    I think your idea for an editor panel for SROptions is great. I've quickly put one together which I'll be polishing up and adding to the main package soon:

     
    Tinjaw likes this.
  2. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi All, SRDebugger 1.4.8 has been approved on the Asset Store and includes the editor SROptions panel above.
     
  3. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Hi Simon, nice asset! I just started using it today for on-device debugging and it looks very useful so far.

    Is there a way to make sure readonly strings in Options fit into their fields? I have some long URL's as read-only properties but the text is cut off. My workaround for now is to use an empty setter so at least I can click the field and move the cursor to see the end... but clearly that's not ideal!

    Screen Shot 2016-06-22 at 16.39.24.png
     
  4. Simie

    Simie

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

    That is a problem I hadn't considered before. A cheeky temporary solution I just came up with is to tag the property with the [DisplayName("..")] attribute and pad it with a ton of spaces. I'll look to making read-only fields expand to fit their contents correctly for a future version. Thanks for reporting the problem.
     
  5. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Thanks! It's not a big issue but glad you will address. Maybe a better option than just fitting to width would be to present readonly fields in table form like you do on the System Info panel (or maybe make it possible for us to fill out a section on that screen)... read-only's are by their nature informative only so might be a better fit that way.

    Two other feature requests to consider:
    - filtering the console via string match and/or regex
    - ok this is a big pie in the sky one... a REPL style interactive console to allow arbitrary code execution, including finding relevant objects in the scene and querying them, call methods etc. That would be super handy for deep diving into issues, trying quick hack fixes on device etc. I believe it's possible in theory, even on iOS where reflection has limitations, but I haven't found a solid implementation yet.

    Anyway thanks for the great product. It's proved it's value already after a single days use ;)
     
  6. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    It's possible to add info the System Info panel fairly easily by modifying this file:
    StompyRobot/SRDebugger/Scripts/Services/Implementation/SystemInformationService.cs

    I've submitted an update with the read-only field width fix. Turning read-only fields into a table would certainly be an option, but it would require an overhaul of the options UI to accommodate that, and also interfere with pinning read-only options.

    On the todo list, might come in a future update.

    While I agree this would be nice to have, it would be a lot of work to include such a feature in SRDebugger. Maybe some day...

    Anyway, I'm glad you have found SRDebugger useful. The read-only fix should be available in a week or so once approved :)
     
  7. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger 1.4.9 has been approved and is now available on the asset store.

    1.4.9
    ----------
    New:
    - Compatibility with Unity 5.4.

    Changed:
    - SROptions: Read-only string options now expand to display entire string.
     
    Huacanacha likes this.
  8. Deleted User

    Deleted User

    Guest

    Is there a way to export the logs when you are on a device? I want to either be able to copy the logs or email it to myself.

    Right now I'm taking screenshots, but it is very troublesome when I can't select the text to verify my values.
     
  9. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    The bug reporter will send the console log with the report, you can use this to receive it at your email address. More Details Here.
     
  10. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
  11. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Any plans for console support, e.g. Xbox One or PS4?
     
  12. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Not at this time, sorry. It would require a fairly large rework of the UI to fully support controllers.
     
  13. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Hi @Simie we just bought your plugin but when we tried it to our Windows Store build the panel never comes up :( It works just fine on the other devices ios and android but not windows 10. The build was done using 5.3.6 and 5.4 but worked in neither any ideas?
     
  14. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @Nihil688, I just tested on Unity 5.4 and with the Windows 10 SDK and it seems to work fine for me. Are there any error messages in the visual studio console that might indicate a problem somewhere?
     
  15. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Nothing shows up and our game plays as normal. I'm running it on a lumia 920 if that matters at all. Could it be that W10 phones have a different setup for depth? There are other UI elements in the same place but it works just fine on other non Windows phone devices

    EDIT: I tried building your sample scene to my phone and it doesn't work there either so it's nothing to do with UI depth.
     
    Last edited: Jul 30, 2016
  16. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Nihil688, sorry for the delay in replying, I wasn't fully available over the weekend for support.

    This is very strange. I've built the sample scene for Windows 10 on both the emulators and my own PC and it seems to work fine. I've a few ideas for things we can do to try and track down the problem...

    - If you call SRDebug.Instance.ShowDebugPanel() from somewhere in your own code does the panel appear? If so, this would indicate it is an input problem with the trigger (or overall if the panel can't be interacted with).

    - If you deploy a fresh project with only SRDebugger imported does the same behaviour occur? If so, this would indicate that there is a problem with SRDebugger when deploying to devices that doesn't show up in the emulator or on desktop platforms. (I'm suggesting a fresh project in case there is any auto-initializing code in your project that might be causing problems with input).

    Hopefully this will help us find the problem. Sorry for the inconvenience!
     
  17. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    @Simie I tried both but neither works I'm afraid. The emulators are never trustworthy as the real thing, especially the Windows Store builds are very problematic
     
  18. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Nihil688, and there is definitely no error message or exception? Hmm.

    This is a bit of a long shot, but I've just been working to debug another problem with Windows Store builds and have a potential fix for that, I'm wondering if it might be related. Could you try and replace the contents of file StompyRobot/SRF/Scripts/Service/SRServiceManager.cs with this: http://hastebin.com/dutikocilu.cs and let me know if it helps?
     
  19. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    It doesn't make it appear unfortunately but it does make my phone lag for a brief second
     
  20. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I'm a bit stumped here. I'd expect there to at least be an error message. Does this occur when you are building your Windows Store project for your local machine? I'm getting hold of a Lumia to test on but will take a few days.
     
  21. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    I had written my own system similar to yours ( I even had a small square button on the top left :D ) but I deleted it as it was having issues when I added yours in my project. I can try to refactor it a bit and try to use it to see if any errors as I don't really get any valuable output from w10 console as it stands. Also no, it doesn't pop up even if I run it on my local machine under x64 setting
     
  22. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Wait, so it's not just on your Lumia that this problem occurs? And there are no error messages when you're debugging on your local machine? This is bizarre. Would it be possible for you to send me your project (with any graphics/large assets stripped) so I can debug this on my machine? I'm happy to sign any NDA if that helps.
     
  23. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    It doesn't work on a windows 10 pc either now that I tested it even with a test project with only your plugin installed.
    Target: Windows Store: SDK: Universal 10, XAML, Local Machine, nothing ticked.
    Visual Studio:Master & x64. I click on the top left and nothing happens
     
  24. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Nihil688, I've been able to reproduce the bug on my machine. I'd been testing the "Debug" and "Release" configurations, not "Master". Master enables .NET Native compilation and I suspect this is the cause of the bug. I'm looking into it now.

    EDIT: I have a fix I'm currently testing and planning to include in the next update to address this. Would you like to give it a go and let me know if it helps?

    http://hastebin.com/gimuxunuwu.cs
    Once again replace the contents of SRServiceManager.cs with that file ^
     
    Last edited: Aug 4, 2016
  25. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Will give it a go now! Cheers!

    EDIT: Yeap it works now!
     
    Last edited: Aug 4, 2016
  26. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hi Simon,

    Bought your asset, it's damn awesome!

    But currently I am trying to dive into DebugPanel.prefab, and every time I apply new changes, it's layout breaks on runtime if watching on a very small resolutions. Be it a single (int or float) number non-important change, or a complex reference to another prefab - does not matter. Once I hit apply it's just breaks.
    I even tried to modify this in a brand new scene - still the same result.
    • Do you have a hint how this can be modified?

    Thanks a lot ;)
     
    Last edited: Sep 3, 2016
  27. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @Simod, thanks for purchasing, I'm glad you like it!

    I'm not encountering the same issue as you when modifying that prefab. (I'm on Unity 5.4.0f3). Are you making sure to apply changes, then disable the prefab and let SRDebugger load it? There will be problems if you try and interact with the prefab if it is not instantiated by the SRDebugger loading process.
     
  28. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Thank you Simon,

    Yes disabling made a trick. The actual steps are:
    1. Make changes
    2. Disable
    3. Apply
    4. Enable in the project window
    But why it's actually breaks? Does it "special feature" of the Unity?
     
  29. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I'm not sure why it was breaking for you, I follow the following steps when working on the prefab and it works fine:

    1. Make changes
    2. Apply
    3. Disable the prefab in the scene
    4. Enter play mode (SRDebugger loads the prefab automatically)
     
  30. antaran

    antaran

    Joined:
    Mar 23, 2016
    Posts:
    6
    Hello.

    I've updated Unity to 5.4.1f1 and encontered NullReferenceException in ProfilerCameraListener.
    Weird thing is the exception doesn't occur after restarting Unity and then it appears after 2nd play.

    BTW I saw the same issue which had been posted by illustir in page 3 but there is no information for the solution. And yeah, the exception only occurs in Unity Editor not in my iphone.

    Here is log.

    exception.png

    It also occurs in function OnPreCull. Unity runs on Mac, El Capitan.

    Thanks!
     
    Last edited: Oct 1, 2016
  31. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @antaran, I've had another user report this, but in their case they had just updated the "SVGImporter" plugin. In any case, I've created an updated ProfilerCameraListener.cs file to work around the error.

    Could you try replacing the contents of ProfilerCameraListener.cs with this file?
     
  32. Simie

    Simie

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

    I've just submitted SRDebugger 1.5.0 for approval on the Unity Asset Store. This update includes compatibility with Unity 5.5 that is releasing soon, and includes some great new features that have been requested for some time.

    EDIT: Now approved! Download from the Asset Store.

    Customers can use our "Source Auth" tool to get access to our GitLab repository for SRDebugger and download the latest release right away.

    Console Searching/Filtering


    Pin Option Categories


    Scroll to Bottom


    And many new features for the API, more information of which will be in the documentation in the next few days.

    Full changelog is below.

    1.5.0
    ----------

    New:
    - Console can be filtered/searched.
    - Console now has a "Scroll to Bottom" button.
    - Option categories can now be pinned/unpinned all at once.
    - API for pinning/unpinning options.
    - Additional "Option Containers" can be registered with the SRDebug api, enabling your own objects to populate the Options tab. API Example.
    - API for adding information to the System tab (which will also be sent with bug reports).

    Changed:
    - Compatibility with Unity 5.5
    - Bug reporter autofills email field with last used email address.
    - Limited maximum console messages. (Default 1500, configurable in settings window)
    - Performance improvements

    Fixed:
    - Windows Store builds with .NET Native now work correctly.
     
    Last edited: Nov 17, 2016
    movra and Arkade like this.
  33. zorusantos

    zorusantos

    Joined:
    Dec 7, 2015
    Posts:
    4
    Hi, we are having SRDebugger issues on windows/android in the 1.4.9 update. Works fine on macs. First, our setup:
    Windows 10
    Unity 5.4.2 Android running in the editor.
    Loading is set to "Disabled" in the SrDebugger settings.

    What happens is that on a fresh unity start, the first time I play in the editor, inputs work fine. After that, every time I play I immediately get a warning saying "[SRDebugger] No EventSystem found in scene - creating a default one." and then inputs don't work until I restart Unity. Our setup has an eventsystem, it's loaded from a second scene before SRDebugger.Init() is called but it seems as if SRDebugger does not shutdown after the first play.

    James
     
  34. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi James (@zorusantos),

    I think I have an idea about why this might be happening. Could you try replacing the contents of this file: StompyRobot\SRDebugger\Scripts\Services\Implementation\DebugTriggerImpl.cs with the code here and let me know if that makes a difference?
     
  35. zorusantos

    zorusantos

    Joined:
    Dec 7, 2015
    Posts:
    4
    Yep, that fixed it!

    Thanks,
    James
     
    Simie likes this.
  36. zorusantos

    zorusantos

    Joined:
    Dec 7, 2015
    Posts:
    4
    Is that fix in version 1.5.0?

    James
     
  37. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    1.5.0 won't include that fix as it's already been submitted for approval, it will be in the next update. The fix will still work on 1.5.0 though.
     
  38. zorusantos

    zorusantos

    Joined:
    Dec 7, 2015
    Posts:
    4
    Thanks Simie.
     
  39. rubeng

    rubeng

    Joined:
    Apr 20, 2013
    Posts:
    60
    Hi, I tried to apply the patch to the 1.5.0 from gitlab but I am still having the issue, I start a scene, and everything works fine, after opening the console, and closing it, the touch stops working except for the console trigger in the corner
     
  40. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @rubeng, is this the same problem as above? It sounds like a general input bug rather than the scene switching bug.

    Does your scene contain an EventSystem already, and does SRDebugger print the "Creating default event system" warning?
     
  41. rubeng

    rubeng

    Joined:
    Apr 20, 2013
    Posts:
    60
    I found more info about the issue, I was able to replicate it in an empty project, just create a new project, add two unity ui buttons one bottom left, and one bottom right, and after opening and closing srdebugger (leave the options pane selected) you will see that the right button stops working.
    By checking in our game I was able to see that the left bar of srdebugger (where you select which panel you want, options, console, profile, etc) still works after closing it, but the panel with the options will block touch even after closing srdebugger.
     
  42. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @rubeng, dang, yes, you're right. This is a bug introduced in 1.5.0. I'm working on a fix now.
     
  43. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    To fix this, replace the contents of "StompyRobot\SRDebugger\Scripts\UI\Tabs\OptionsTabController.cs" with the file here. EDIT: Or grab the latest release from the gitlab repo.
     
    Last edited: Nov 4, 2016
  44. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    does anybody know i get this error in editor often when using SRDebugger http://prntscr.com/d3pjbr
    it doesn't matter if the prefab is dropped in the scene, instantiated, automatic start or using SRDebugger.Init?

    Help!
     
  45. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @pretender, this is fixed in the latest version of SRDebugger, currently waiting for approval for release on the Asset Store. You can access it early by following the links in my announcement post above.
     
  46. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi,
    Loving SRDebugger. May I suggest a tiny patch to enable compatibility with MAD Compile Time Optimizer, please. MCTO moves the code but doesn't move the resources (images, etc) so they'll be in the default place.
    Thanks!

    Code (CSharp):
    1. diff --git a/Assets/StompyRobot/SRDebugger/Scripts/Internal/EditorUtil.cs b/Assets/StompyRobot/SRDebugger/Scripts/Internal/EditorUtil.cs
    2. index 2667bb0..2409dd0 100644
    3. --- a/Assets/StompyRobot/SRDebugger/Scripts/Internal/EditorUtil.cs  
    4. +++ b/Assets/StompyRobot/SRDebugger/Scripts/Internal/EditorUtil.cs  
    5. @@ -11,6 +11,7 @@ namespace SRDebugger.Internal.Editor
    6.      {
    7.          // Path to this file from the root path
    8.          private const string TestPath = "SRDebugger/Scripts/Internal/EditorUtil.cs";
    9. +        private const string BasePath = "Assets/StompyRobot/SRDebugger";
    10.          private static GUIStyle _bgStyle;
    11.          private static Texture2D _logoTexture;
    12.          private static Texture2D _welcomeLogoTexture;
    13. @@ -42,6 +43,11 @@ namespace SRDebugger.Internal.Editor
    14.              var p = GetRootPath() + "/" + path;
    15.              //Debug.Log("[SRDebugger] Loading " + p);
    16.              var asset = AssetDatabase.LoadAssetAtPath(p, typeof (T));
    17. +            if (null == asset) { // try BasePath
    18. +                p = BasePath + "/" + path;
    19. +                //Debug.Log("[SRDebugger] Loading (try 2) " + p);
    20. +                asset = AssetDatabase.LoadAssetAtPath(p, typeof(T));
    21. +            }
    22.              return asset as T;
    23.          }
    24.  
     
  47. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Arkade, I'll look into another way of doing this. I'd like to support the asset being in any directory, which is why the current method uses relative paths from a source file. I'll see if I can adjust it to use a relative path from a non-source file for a future version.


    SRDebugger 1.5.0 has been approved and is now live on the asset store! It's a recommended upgrade if you're planning to use Unity 5.5 when it leaves beta.
     
  48. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Hi.
    I have a small question:
    I'm initializing SRDebugger in my first scene, which is a menu. I then switch to the actual game, which works in the following way:
    1. I load a scenes which contains my level as a background
    2. I additively load another scene with foreground objects and the UI (and the Event Manager).

    The problem here is that whenever I load the level scene in step 1, the menu scene gets unloaded and the EventManager from the menu scene is deleted, however the scene in step 1 doesn't contain an EventManager, since it only contains the level. The EventManager and the UI is supposed to additively load later. However SRDebugger persists the whole time, and after the menu scene is gone, it can't find the EventManager and creates one instead. After step 2 is executed, the EventManager from scene 2 is loaded and I get an error that I can't have 2 EventManagers in the scene.

    Is there a way to somehow pause or disable the debugger through code, so I can enable it once the proper EventManager is loaded in step 2?

    Thank you!
     
  49. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Devil_Inside, if you're creating and managing your own EventSystem you can disable SRDebugger's check for event systems to prevent any conflicts.

    In the file StompyRobot\SRDebugger\Scripts\Internal\Util.cs at line 44 there is the EnsureEventSystemExists() method. Simply add a return false; at the start of the method and that will disable the automatically generated EventSystem.

    I'll see about adding an option in the settings window to disable the automatic creation of EventSystems in a future update to save the hassle of changing this bit of code.
     
    Devil_Inside likes this.
  50. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Thanks a lot for the quick reply! That worked perfectly!