Search Unity

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

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

  1. Igorexa

    Igorexa

    Joined:
    Sep 25, 2014
    Posts:
    23
    First, thank you for good plugin.

    I have a question:
    Can I display colored rectangles in options ( like in inspector on this screenshot ) ?

    \
     
  2. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @Igorexa, thanks for using SRDebugger. Unfortunately there isn't a method for displaying colours like you describe. You can organise and categorise options using the Attributes, however.
     
  3. Igorexa

    Igorexa

    Joined:
    Sep 25, 2014
    Posts:
    23
    Can you add collapse/expand feature for Options Category?

    And can i display my own log? (some my managers classes has his personal logs (list of strings) - it need to separate they log from main log. I want to view it via SRDebugger - can i do this?)
     
  4. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I've added this to the roadmap for consideration.

    This isn't possible right now unfortunately.
     
  5. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    112
    I've had this for a while and one of my most used assets thanks!
     
    Simie likes this.
  6. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Thanks @Mcg! I'm glad you like it!
     
  7. TomBrien

    TomBrien

    Joined:
    Apr 28, 2012
    Posts:
    111
    Hi!

    I'm working on porting a game from desktop PC to the Xbox One and PS4. They're using SRDebugger and InControl.
    All menus respond perfectly well to input from the Xbox One controller, apart from the SRDebugger interface. I can't navigate to other options in the option panel.
    Do you have any idea why this might be? I assume you're just using Unity's UI system and Event Manager, right?
     
  8. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @TomBrien. Unfortunately SRDebugger doesn't support gamepad-only input due to the number of custom UI controls that were designed with only touch/pointer input in mind. This may change in a future version, but for now that's how it is. Sorry for the inconvenience.
     
  9. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Hey Simon,

    is it ok if I change up the design of SRDebugger a bit and remove the branding stuff? Id like to integrate it into my game in every aspect, design included, since I will use it in alpha testing phase a lot with my players.

    I can put all the necessary credits and mentions in the credits section of the game if needed.
     
  10. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @KarloE, yes, that's fine. Please keep the text at the bottom of the System Info tab, or add it to your game credits section, as that is required by the license we use for the icons included in SRDebugger.
     
  11. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Great. Sure, thank you.
     
  12. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    How do I select a console message so I can see the full output? I'm on a pc build, but I would also like to enable this for other input devices such as ps4 controller as well.
     
  13. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @wightwhale, simply tap on the log message and the full message and stack trace will be visible in the lower section of the console window. The demo video on the website shows this in action. (This isn't possible on the docked console)
     
  14. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    ok i would like to do that but tap doesn't work at all, how do I get that working on pc?
     
  15. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @wightwhale, it should work on desktop the same as mobile. Are you using the latest version of SRDebugger? What version of Unity are you running? Are there any other parts of the SRDebugger panel that aren't responding to taps correctly?
     
  16. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    I updated versions on srdebugger just now and i'm running unity 5.4.3p1, but the tap has never worked in my game anywhere, maybe I have something disabled in my project which is needed for the debugger clicking to work properly.
     
  17. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @wightwhale, it's possible something in your scene is interfering with input in SRDebugger. Are you using the Unity UI and your own EventSystem in your game? If you use SRDebugger in an empty scene does tapping on console entries work correctly?
     
  18. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    So it does work fine in an empty scene in my project. I am using the unity UI in my project with my own event system for my game, is there a way to link the two?
     
  19. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Usually using your own Event System is fine. SRDebugger checks to see if you has one and only creates its own if it doesn't find one.

    Could you post the settings for your Event System? (A screenshot of the inspector with all the components visible would do).
     
  20. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397

    Not sure if I've removed some mouse parts that need to be on there or what
     
  21. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    If you press the "Add Default Input Modules" button does it fix the problem? Usually you have a "Standalone Input Module" at least.
     
  22. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    Yep adding that fixed the issue, thanks a lot for the support. Doesn't seem like it breaks other controls in my game either. Thanks!
     
    Simie likes this.
  23. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
  24. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger 1.5.1 is available now on the asset store.

    1.5.1
    ----------

    Fixed:
    - Compile on WSA builds.
    - Editor resources not being found when using Mad Compile Time Optimizer to move scripts.
    - Log messages from other threads not being captured.

    New:
    - Added setting to disable automatically generated EventSystem.
     
  25. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    109
    Would it be possible to add an option to go directly to the docked position of the console ?
    (With a Keyboard shortcut)

    It's what I use 99% of the time and now I have to click several times everytime I want to use it.
     
  26. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Wilbert-Blom, yes, you can do that!



    Check the Keyboard Shortcuts section in the settings menu.
     
  27. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    109
    It's already possible!
    Great!

    Thank you for your swift support :)
     
  28. Igorexa

    Igorexa

    Joined:
    Sep 25, 2014
    Posts:
    23
    Simie, can you add page for show history.txt (or another text file). On it testers can view history.txt with changes and fixed bugs (which should be checked in the new build).
     
  29. fernando-messias

    fernando-messias

    Joined:
    Feb 3, 2016
    Posts:
    1
    I am trying using OnPropertyChanged callback to live update the last value set, but I can't see changes until reopen the Options tab.

    My code is actually for tests:
    Code (CSharp):
    1. public partial class SROptions {
    2.  
    3.     private string _netBytesIn;
    4.  
    5.     [Category("Net")]
    6.     public string NetBytesIn {
    7.         get { return _netBytesIn; }
    8.         set {
    9.             _netBytesIn = value;
    10.             OnPropertyChanged("NetBytesIn");
    11.         }
    12.     }
    13.  
    14.     [Category("Utilities")]
    15.     public void TestChangeValue() {
    16.         NetBytesIn = "ValueChanged";
    17.     }
    18.  
    19. }
    I don't know what is wrong, can you help me? Thank you!
     
  30. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @fernando-messias,

    My apologies, this is a bug in the property changed callback.

    To fix, please replace the file at StompyRobot\SRDebugger\Scripts\Services\Implementation\OptionsServiceImpl.cs with this file.

    This fix will be included in the next release.
     
    fernando-messias likes this.
  31. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    Hi,

    simple question, it may have been asked already but I haven't gone through the whole thread: if the game locks the mouse, is it our responsability to unlock it when SRDebugger opens? If so, what is the event to know that the SRDebugger is opening?

    P.S.: I guess I have to use PanelVisibilityChanged, working on it :)
     
    Last edited: Jan 18, 2017
  32. Simie

    Simie

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

    SRDebugger will try to show the cursor when the debug panel has been opened and reset it to the previous setting once it is closed. This won't work if you're setting the cursor state every frame though.

    EDIT: Or, it should, looking at the code I think that was left unimplemented. It'll be in the next version if so.

    EDIT 2: Yes, unimplemented. Dang! Sorry about that. Yes, the PanelVisibilityChanged event will suit your needs for now.
     
  33. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    Leave it optional please, I think the PanelVisibilityChanged event solution is the best one, since unlocking the cursor is usually not enough. For example, I may need to change some other logic (like be sure that the camera doesn't rotate while the SRDebugger is on and the cursor is moving).
     
  34. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @sebas77 yes, you're right. I was going to add an option in the settings panel to enable/disable that behaviour.
     
  35. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    thanks, so far the plugin is working very well! ;)
     
  36. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    Another question if you don't mind, I am trying pinning options and it works, however I noticed that the only option I pinned, which contains just a boolean, reacts to the pressure of the bar key. Is this the default option? Can it be disabled?
     
    Last edited: Jan 18, 2017
  37. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Do you mean the space bar? It should only toggle the value due to the space bar if it is the last selected UI element, i.e. you clicked on it to toggle the value and haven't clicked anywhere else since. Is that what is happening?
     
  38. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    yes you are right, thanks!
     
  39. Simie

    Simie

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

    I've just submitted a new update for SRDebugger for approval on the asset store. As before you can access it early via the Gitlab repo once you've activated your license key at the source auth page.

    1.6.0
    ----------

    New:
    - Cursor is automatically shown when debug panel is opened. (can be disabled in settings)
    - Added an API for converting the debug panel into a world object that can be positioned in the scene (useful for VR). See docs for information.
    ^ This is an advanced feature that is not officially supported but provided for users who know how to use it.

    Changed:
    - Use Rect sprite packing for SRDebugger UI assets to prevent rendering artifacts.

    Fixed:
    - OnPropertyChanged in SROptions having no effect.
    - Cameras disabled during the frame preventing profiler from recording frames. (Google VR compatibility)
     
  40. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    1.6.0 has been approved and is now available for download from the Asset Store.
     
  41. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    I've just updated to 1.6.0 and got the following error:

    Code (CSharp):
    1. MissingReferenceException: The object of type 'ProfilerCameraListener' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. SRDebugger.Profiler.ProfilerServiceImpl.GetExpectedCameraCount ()
    4. SRDebugger.Profiler.ProfilerServiceImpl.CameraDurationCallback (SRDebugger.Profiler.ProfilerCameraListener listener, Double duration)
    5. SRDebugger.Profiler.ProfilerCameraListener.OnPostRender ()
    As I understand from the discussion - this may be related to one of my plugins. How can I remove/suppress this error?
     
  42. Simie

    Simie

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

    Does this error occur multiple times or just once? It might be that you or a plugin is removing a camera object during the frame and SRDebugger doesn't pick up on the camera being removed until the next frame.

    For a fix, replace the contents of StompyRobot\SRDebugger\Scripts\Profiler\ProfilerServiceImpl.cs with this file: https://hastebin.com/isusozuyez.cs
     
    tosiabunio likes this.
  43. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    It happened only once and the updated fixed the problem. Thanks @Simie!
     
  44. mseithe

    mseithe

    Joined:
    Feb 17, 2017
    Posts:
    19
    Hello, first of all thanks for this great addon, I'm enjoying it a lot.
    I am however experiencing some issues using the bug reporting feature. At the end of the reporting process I'm always getting this error message on the console:

    Bug Reporter Error: 500 Internal Server Error
    UnityEngine.Debug:LogError(Object)
    SRDebugger.Internal.BugReportApi:SetCompletionState(Boolean) (at Assets/AssetPacks/StompyRobot/SRDebugger/Scripts/Internal/BugReportApi.cs:126)
    SRDebugger.Internal.<Submit>c__Iterator0:MoveNext() (at Assets/AssetPacks/StompyRobot/SRDebugger/Scripts/Internal/BugReportApi.cs:92)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    Alas, no report is sent. The API-key should be correct. Not sure if related but I'm running Unity on Linux. Thanks!
     
  45. Simie

    Simie

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

    I've just tested the bug reporter on a linux VM (both the editor and the standalone player) and haven't been able to reproduce the problem you're seeing. I've made some changes on the server that may fix the problem, or at least give me a better idea what might be causing it. Can you try submitting a report again and let me know when you've done that?
     
  46. Miser3

    Miser3

    Joined:
    Feb 21, 2017
    Posts:
    1
    Just purchased SRDebugger because it says it supports Playmaker, but the only actions it has seem to be for tweaking the options of SRDebugger. Is it possible to just print messages from playmaker to the console?? That is why I bought this package. They do not show up in the console at all, though.
     
  47. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    SRDebugger will capture any messages that are sent to the Unity console. So you can use the built in playmaker logging actions (documentation here) and they will appear in the SRDebugger console. Make sure "Send to Unity Log" is enabled.
     
  48. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    Hi,

    I am having a crash that I had to fix on my own , although surely not in the right way.

    I create the gameobject manually, using SRDebug.Init. I assume that the object doesn't destroy on level transition (and it seems to work), however in some circumstances (not all the level transitions reproduce it), I get the error:

    SRDebugger.Profiler.ProfilerServiceImpl.GetExpectedCameraCount () .../StompyRobot/SRDebugger/Scripts/Profiler/ProfilerServiceImpl.cs:156)
    SRDebugger.Profiler.ProfilerServiceImpl.CameraDurationCallback (SRDebugger.Profiler.ProfilerCameraListener listener, Double duration) (at .../StompyRobot/SRDebugger/Scripts/Profiler/ProfilerServiceImpl.cs:144)
    SRDebugger.Profiler.ProfilerCameraListener.OnPostRender () (at .../StompyRobot/SRDebugger/Scripts/Profiler/ProfilerCameraListener.cs:68)

    Currently I fixed it added this:

    private void CameraDurationCallback(ProfilerCameraListener listener, double duration)
    {
    /*// Time to first camera
    if (_reportedCameras == 0) {
    _updateToRenderDuration = _stopwatch.Elapsed.TotalSeconds - duration - _updateDuration;
    }*/

    //_renderDuration += duration;
    _reportedCameras++;

    _renderDuration = _stopwatch.Elapsed.TotalSeconds - _updateDuration - _updateToRenderDuration;

    for (var i = _cameraListeners.Count - 1; i >= 0; i--)
    {
    if (_cameraListeners == null)
    {
    _cameraListeners.RemoveAt(i);
    }
    }


    if (_reportedCameras >= GetExpectedCameraCount())
    {
    EndFrame();
    }
    }
     
  49. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @sebas77, I believe that this is the same bug fixed in the patch in this post. Your solution is essentially the same fix.

    It'll be included in the next update, but for now your fix will do the trick.
     
  50. mseithe

    mseithe

    Joined:
    Feb 17, 2017
    Posts:
    19
    Hi Simie, thank you for having a look. The changes you have made have indeed made a difference in that the exception now happens right when I click the submit button and not at the end "of the progress bar". However, I've tested on Win and Mac and it works fine there, so this issue is not a big deal for me. I am running Arch linux which is only relevant for a tiny fraction of players anyways so I'm fine with you not digging further into this. Cheers!