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 @gaiomed, how are you setting the value? If it's not through SROptions.Current.Value = someValue; then the OnPropertyChanged event will never be called, and the displayed value in the options tab will not update.

    SRDebugger does a refresh of all properties when the options panel is opened, but only knows about changes at other times if OnPropertyChanged is called.
     
    gaiomed likes this.
  2. gaiomed

    gaiomed

    Joined:
    May 5, 2013
    Posts:
    48
    yes stupid me, that makes sense, I kind of overread and oversaw that as I set my values in an own class to serialize the values and didnt set the value that way.

    many thx,
    Robert
     
  3. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    No worries, glad I could help. Thanks for using SRDebugger :)
     
  4. JasonCG

    JasonCG

    Joined:
    Oct 6, 2012
    Posts:
    29
    Hi,

    I've been really happy with SRDebugger! However I've run into a strange issue. I'm running Unity 2017.1.1f1 (and see the same thing in 2017.2.0f3).

    On the Profiler tab, the profiler and the FPS indicators aren't updating. The profiler doesn't draw anything, and for FPS it says "NaN". Memory usage is updated as normal, and everything else works fine (such as the Console tab). This happens in on the Unity editor on Windows, the editor on Mac, and in a standalone Windows player executable.

    I've tried running through the code to find where the problem is starting. I got as far as ProfilerServiceImpl.cs, int the Update method, FrameBuffer.Count is 0 so there is a divide by zero on line 80.

    I also completely deleted the whole StompyRobot directory, and reimporting it, but no change.

    Thanks!
     
  5. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    It's very nice asset!
    by the way, I found a bug.
    I can build my project with SRDebugger on the Mac. But Unity Cloud Build + Windows cause error "
    System.Exception: Unable to find SRDebugger root path"
    I fix this

     
  6. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,

    If you import SRDebugger into an empty project does the same problem occur? I've tested it in 2017.1.2p1 and can't reproduce this bug.

    Cheers,
    Simon
     
  7. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,

    Thanks for reporting the issue.

    Do you have SRDebugger in a nested folder somewhere in your project, or is it in the Assets/StompyRobot folder?
     
  8. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    I placed `Assets/Plugins/StompyRobot`
     
  9. cubaschi

    cubaschi

    Joined:
    Oct 23, 2012
    Posts:
    51
    First: I love your project.
    That said I have severe framerate issue since upgrading to 2017.2
    I updated SRDebugger after upgrading to 2017.2 (deleted everything except settings) because I couldn't see the trigger anymore with an older version.
    Now everytime I open the window but close it again the framerate is pretty bad.

    I am a bit stressed out about this. Do you have any idea?

    UPDATE: I just downgraded to 2017.1.1p4 and the problem seems to be gone.


    Best,

    Simon
     
    Last edited: Oct 24, 2017
  10. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hey Simon,

    I've reproduced that strange performance problem in 2017.2, however it doesn't seem to be present in the 2017.3 beta, so I assume it must be a regression on Unity's side.
     
  11. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Hi, i noticed that SRDebugger adds some images to all builds, quite many actually, though they are very small files.
    I looked further into how to reduce the build size regarding files from assets like this.

    The problem is that most of them are "NPOT"/Power of Two-textures. To be able to crunch all images to smaller sizes for each platform, the textures need to be in "Power-of-two" dimensions. The automatic conversion has some problems, and if I do it manually it will make upgrading SRDebugger a pain.

    @Simie , would it be possible for you guys to make sure all these origin images in correct dimensions (64x64, 128x128 etc)? This could save 200-500kt of space on builds.
     
  12. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    @Simie
    Some corrections to my previous post: the NPOT-textures (which are a minority in SRDebugger) are going to an sprite atlas, which isnt so picky about NPOT.

    So POT source files might not be all we need, but there seems to be a Unity bug/oddity which makes NPOT Sprites not automatically able to resize to POT. Inside the atlas they dont have to be either, but I didnt find a way to set the atlas to a crunched format, do you know how to set it?

    Cruched format would save those unnecessary up to 500k:ish bytes from my builds.

    My current solution is to limit every max-size mostly to 32, saving quite a bit. Its not optimal though.
     
  13. Simie

    Simie

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

    Due to issues we had in the past with tight packing causing bleed between sprites we forced rect layout using the [RECT] tag in the packing tag. If you select all the sprites in the SRDebugger folder and change the packing tag from "[RECT]srdebugger_default" to "[TIGHT]srdebugger_default" it should use the tight packing scheme.

    EDIT, Oops, I misread you post. I assumed you meant the sprite packing scheme but you were actually talking about the texture format. My understanding is that you need to change the format of the textures to crunched, and only sprites with the same packing tag + the same texture format will be packed into the same atlas.
     
  14. pixlweaver

    pixlweaver

    Joined:
    Dec 21, 2012
    Posts:
    92
    I can't seem to find the UI Scale option. Is this feature still in the works?
     
  15. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Hi @Simie,
    I don't know if it's a bug, but I can't clear the console log more than once. The first time it works fine, however the second time I try to clear the log, the error/warning/log counters are getting reset to zero, however the actual log stays and I can't get rid of all the messages in the log.
     
  16. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,

    What platform is this? Is it in the Editor, or on a device? Also, what version of Unity are you using?

    Thanks
     
  17. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Happens both in editor and on device.
    I'm using 2017.3.1p1 now, but it happened before on previous versions as well.
    https://giphy.com/gifs/7XoXqscXXp7u6oIjek/html5
     
  18. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Huh, wow! I'm surprised that hasn't been reported before. I've got a fix in place and submitted a new version to the Asset Store for approval. It should be available in a week or so.
     
  19. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Awesome! Thank you!
     
  20. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi
    Bug reporter seems to have stopped working for my WIP project. [EDIT: I have part of the answer -- next post concludes.]

    I just tried sending myself some bugs for screenshots and am not receiving them any more. Last one was 27/12/2016. I don't use the facility much so not sure when it changed.

    I checked the e-mail address and that seems OK. I checked the API key (pressing your button) and that says OK. Done from both Android build and Editor. I'm using Unity 2017.03.0 (which /has/ changed since that last one). I applied Unity's Assembly Definition Files to all my assets recently and SRDebugger seems fine in every other regard with this. I have also added a PanelVisibilityChanged listener that calls DestroyDebugPanel() when it's been hidden. Hmm... yeah, I've not checked but I could see this being the problem. Doh. Right.

    Out of interest, I did this due to SRDebugger being top of the profiler when 'disabled' (not destroyed) on mobile. It was getting layout calls which caused my mobile VR game to chew CPU unnecessarily. It'd be nice to fully disable so this doesn't happen (please). (and btw I'm toggling VR mode off when SRDebugger is up -- hence not wanting it around when it's removed!)

    I'll try disabling my call to DestroyDebugPanel(). If it's not that, anything else I should check?
    Thanks.
     
    Last edited: Mar 22, 2018
  21. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    So yes, that was the problem. I'll work around but will write notes here in case you have recommendations.

    It seems pressing "Submit" causes a PanelVisibilityChanged (false) immediately (which was what caused my problem) then restores it. I imagine that's so you can take the screenshot. Obviously my callback then called DestroyDebugPanel() hence it didn't send. I realize you might have some customers doing things in that callback hence you can't change it now. I guess I'll put in a timer to spot it being only a temporary visibility change. (unless you have better suggestion?)

    Thanks (though can I still request fully disabling the SRDebugger if nothing is being pinned!)
     
  22. Simie

    Simie

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

    I've added an item to the to-do list to implement a "destroy on close" checkbox somewhere. I don't have any ETA on when the next update will drop, though.

    In the mean time, you can press and hold the close button when closing SRDebugger and it will destroy the panel entirely from the scene, same as calling the DestroyDebugPanel() API.
     
    Arkade likes this.
  23. GustavNinja

    GustavNinja

    Joined:
    Jun 13, 2016
    Posts:
    96
    Hi I was wondering if you guys will support arrays/list so that you can use it like an enum to go to the next option in the list?
     
  24. IDreamofIndie

    IDreamofIndie

    Joined:
    Dec 24, 2014
    Posts:
    38
    Hello, I am trying to set up so when an option is changed it calls a method on another script. The way i have it now seems to be working correctly( when useBloom Option is toggled it calls ToggleBloom(); Is there a better way to do this?

    Thanks

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class GraphicsTest : MonoBehaviour {
    6.     private bool useBloom {get{ return SROptions.Current.Bloom; }}
    7.  
    8.     void Start(){
    9.         SROptions.OnToggleBloom += ToggleBloom;
    10.     }
    11.     public bool GetBloom(){
    12.         return useBloom;
    13.     }
    14.  
    15.     public void ToggleBloom(){
    16.         Debug.Log("Bloom Is Enabled: " + useBloom);
    17.     }
    18.  
    19.  
    20.  
    21. }
    Code (CSharp):
    1. using System.ComponentModel;
    2.  
    3. public partial class SROptions{
    4.     private bool useBloom = true;
    5.  
    6.     public delegate void ToggleBloom();
    7.     public static event ToggleBloom OnToggleBloom;
    8.  
    9.     [Category("Post Effects")]
    10.     public bool Bloom{
    11.         get{ return useBloom; }
    12.         set{ useBloom = value;
    13.             OnPropertyChanged ("Bloom");
    14.             OnToggleBloom ();}
    15.  
    16.     }
    17.  
    18.  
    19. }
     
  25. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    If you need need the callback to execute the toggle then that seems fine to me. You could use the PropertyChanged event that is build-in to SROptions instead of defining your own, but that would come with the overhead of having to check the property name string.
     
  26. MrCl3an

    MrCl3an

    Joined:
    Aug 27, 2013
    Posts:
    2
    Hopefully Quick Question. Using Unity2017.3.1p1 and with regards to the Bug Reporter, it says to enter my 9-digit Invoice number. The only Invoice number I have starts with IN01 and then 10 additional digits (purchased Dec. 2017). Is this the correct number? I've tried using the entire invoice number with and without the "IN" and also the last 9 digits and I keep getting an error "Error getting response stream (ReadDone2): ReceiveFailure" although it sounds more like a connection issue. Any ideas here?
     
  27. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi. Yes, the number beginning with IN* is the one you want. The description on the form hasn't been updated yet to address the change in invoice number format that Unity introduced a while ago.

    The error you are seeing is strange. By any chance is Unity blocked from accessing the internet by your firewall?
     
  28. MrCl3an

    MrCl3an

    Joined:
    Aug 27, 2013
    Posts:
    2
    Thank you for getting back to me!

    I don't think it's firewall related (although I will double check), as I've tried from multiple locations, all with different internet connections. I'm also connected to the Asset store via the Unity Editor, so I know at least that works.

    Does it by chance lock the connection to the Unity User account that purchased the plugin as well? Or should it not matter as long as I have the invoice number?
     
  29. DarthStridious

    DarthStridious

    Joined:
    Jun 13, 2018
    Posts:
    1
    Hi @Simie,
    I am using Unity 2017.4,2f2 and when we build our project to Mobile either IOS or Android we see the console entries but we do not see the stack trace it is empty. When I build with profiler I can see the stack trace. I am trying to figure out what is causing this. I am wondering if you have any input in this matter thank you.
     
  30. Wawro01

    Wawro01

    Joined:
    Apr 23, 2014
    Posts:
    44
    Hey guys, we just purchased this plugin and it's awesome! In same time we are trying to use new unity scriptable rendering pipeline, and recently few callbacks were removed. One is OnPostRender() and second
    OnPreCull(). Is there some easy way to make FPS counter work with this?
     
  31. xrix4096

    xrix4096

    Joined:
    Sep 29, 2016
    Posts:
    12
    Hi, I just got this tool last week and overall I think it's awesome and is really helping me in my quest to make a game run at acceptable speed on a PS Vita test kit where I have few other sources of information.

    One thing I've noticed though is that the profiler / FPS counter seems a little strange. The FPS counter seems to take an average over quite a long period, making it quite hard to assess performance in a scene that is rapidly changing. To counter that I've tried to do the profiling while my game is in pause mode to give the counter time to stabilise. This means that I've done a:

    Time.timeScale = 0f;

    This seems to freak the profiler out altogether and I end up with everything being reported as infinitely quick. Is this just a simple case of SRDebugger needing to use unscaled time internally or is there some reason why it uses the scaled time?

    Thanks

    -- Chris
     
  32. Simie

    Simie

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

    Good catch, the profiler is using Time.deltaTime when calculating the full frame time. I'm working on some updates for the profiler to support SRP and will switch over to using Time.unscaledDeltaTime at the same time.

    The FPS should be calculated as an average of the last 20 frames in the profiler's buffer (which is usually about half a seconds worth of frames). EDIT: I've just realised it's using the 20 oldest frames in the buffer, which would explain the behaviour you are seeing. I will have this fixed in the next release.

    Cheers,
    Simon
     
    Last edited: Aug 22, 2018
  33. gideonstillalive

    gideonstillalive

    Joined:
    Aug 28, 2018
    Posts:
    1
    Utlis.cs line 58
    Code (CSharp):
    1. var e = Object.FindObjectOfType<EventSystem>();
    should be something like
    Code (CSharp):
    1. var allE = Resources.FindObjectsOfTypeAll<EventSystem>();
    2. var e = allE.Length == 0 ? null : allE[0];
    coment on the line below reads:
    // Check if EventSystem is in the scene but not registered yet

    Object.FindObjectOfType does not find disabled objects or objects that were spawned previously in this frame so e will always be null

    we are on 5.6
     
    Last edited: Aug 28, 2018
  34. Simie

    Simie

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

    The automatic event system creation is only meant as a failsafe in case the project SRDebugger is running in does not use the Unity UI/EventSystem. If you have some kind of auto-creation of EventSystems in your game or can guarantee that an EventSystem is always present then it's best to disable SRDebugger's event system creator via the Settings Window.

    https://www.simonmoles.com/uploads/Unity_2018-08-28_21-14-51.png[/IMG}
     
  35. king_hiflyer

    king_hiflyer

    Joined:
    Nov 14, 2017
    Posts:
    2
    Hi,

    we started using SRDebugger on our prototype project a couple of weeks ago and it worked fine out of the box. I just organized our codebase into assemblies and then the SRDebugger UI stopped working. I can still access the options panel in the editor using the menu command but the triple tap no longer works. I get no errors in the log.
     
  36. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi, can you provide a screenshot/overview of your changes to the SRDebugger structure?
     
  37. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    255
    Is there any reason why AutoInitialize can't use RuntimeInitializeLoadType.BeforeSceneLoad? As it stands right now it seems like you need to add the Init prefab to every scene that starts to ensure all the logging gets captured
     
  38. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,
    The latest version of SRDebugger (1.8) uses BeforeSceneLoad to capture the logs and defers the rest of initialization until AfterSceneLoad. The prefab initialization mode has also been removed as Unity 4 is no longer a supported platform.
     
    eventropy likes this.
  39. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Hi, I'm wondering if that's possible to extend custom layout for runtime visual debugging purposes, say print text on character's head, draw raycast/spherecast or even runtime graph nodes.
     
  40. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,

    SRDebugger does not perform any world-space rendering of debug information. It's entirely UI based.

    It is possible to implement your own debugger tabs in the same way as the built-in tabs. If you would like assistance with this then please contact me at contact@stompyrobot.uk.
     
    zhuchun likes this.
  41. voxelholic

    voxelholic

    Joined:
    Feb 2, 2016
    Posts:
    6
    Is it possible to change the layout of the options? For instance by default, options are displayed horizontally across the bottom left. I found how to change the general option position to be top-right but, ideally, I would like the individual options displayed vertically, from the top-left down the left edge of the game window.

    Thanks! I'm really impressed with SRDebugger so far.
     
  42. Igor_Time

    Igor_Time

    Joined:
    Dec 2, 2016
    Posts:
    21
    Hi! Thanks for great Asset!

    But I found a bug:
    - I can't setup float numbers correctly if my System Localization is Russian.
    - Example in UI: value = 50 -> typing 50.5 -> press enter -> the value still = 50

    How can I fix that? Thanks!
     
  43. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
  44. FranFndz

    FranFndz

    Joined:
    Sep 20, 2018
    Posts:
    178
    Nide debug menu. I will probably stop using my own stuff. lol,

    Question, is there a possibility to update values inside the option menu or pined menu?
    For example I have a script who change the values inside an Update.
    I want to show the updated value using the Debug Window every frame.

    how?

    Thanks!
     
  45. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,

    The documentation has a guide for making values update when they are changed: https://stompyrobot.uk/tools/srdebugger/documentation/#onpropertychanged

    I hope this helps.

    Simie
     
  46. nukeustwo

    nukeustwo

    Joined:
    Sep 4, 2015
    Posts:
    51
    Hi Guys,

    Fantastic asset, I have a couple of wants/suggestions that's currently stopping me on replacing my own developer ui with it!

    1.) Using an iPhoneX resolution in editor makes the UI teeny tiny.

    Screenshot 2018-12-01 at 17.32.24.png

    2) Very related, the UI doesn't respect notches or cornering, this makes it impossible to use certain panes/tabs such as the console logging filters and error/warning/info toggling. I believe unity returns the scree safe area at runtime at least so possibly the anchoring of the canvas could respect this at runtime?

    3) A minor but useful addition would be reporting mono memory growth per second in the profiler (which gives an indication of GC allocation rate) rather than having to guesstimate in your based on current MB usage vs last time it updated.

    4.) I'd love to add a custom InfoBlock for specific game related info I'd like to surface in the system tab, but I couldn't see it in the docs and on a semi quick glance at the code it's not immediately obvious how to extend the system to allow this in the statistics panel.

    5.) If using warnings as errors (smcs.rsp), SRMonoBehaviour will fail to compile while building due to some news on inherited members which no longer hide them

    Congrats on making one of the rare truly high quality assets out there!
     
  47. Simie

    Simie

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

    Notch support is on the radar, as well as fixes for scaling on super-high DPI screens.

    You can add info blocks via the SRDebugger API: https://www.stompyrobot.uk/tools/srdebugger/documentation/#api

    void AddSystemInfo(InfoEntry entry, string category = "Default");


    I'll also take a look into those warnings, thanks for the heads up.

    Simie

    EDIT: I see you're testing in-editor. The scaling behaviour should be more reasonable when on an actual device due to how the editor handles Screen.dpi.

    I notice you have notches in your editor window, is that a custom tool or a new Unity feature? I'd be very interested in having something like that for testing.
     
    Last edited: Dec 1, 2018
  48. nukeustwo

    nukeustwo

    Joined:
    Sep 4, 2015
    Posts:
    51
    @Simie I threw together some code for the allocation per second metric I wanted, feel free to copy or write your own if you think the feature altogether makes sense:

    Code (CSharp):
    1. private DataVelocity _dataVelocity = new DataVelocity();
    2. public void TriggerRefresh()
    3.         {
    4.             _dataVelocity.AddDatum(Time.realtimeSinceStartup, currentMb);
    5.             MBPerSecondText.text = "<color=#FFFFFF>{0:f3}</color>MB/S".Fmt(_dataVelocity.GetVelocity());
    6.         }
    DataVelocity written here: https://paste.ofcode.org/36d63d7Q8Ztt6wk7zXtEuKN
     
  49. nukeustwo

    nukeustwo

    Joined:
    Sep 4, 2015
    Posts:
    51
    @Simie re. device overlays, no this is custom stuff we wrote for ourselves, it's pretty simple but can get more complex if you want to write a useful backend for managing it all, the basic approach is, use a hidden monobehaviour to render an overlay custom texture (which is the iPhoneX notch+corners) and ensure the resolution is set correctly:

    DrawDeviceOverlay.cs: https://paste.ofcode.org/3qU2QfcXDyBBezZzxfE8Uh
    ApplyOverlayGameObject.cs: https://paste.ofcode.org/3r5fb4zD3qPWixLuPcsPvz

    For that last one we cache our own set of skins for different devices (e.g. pixel devices) so you can ignore a few lines of code.

    EDIT:

    Custom png skins for iPhoneX and Pixel3 (the ones we use)
    https://drive.google.com/drive/folders/1st0dwQhAHJXTuKmCLHsw5LJEtTNaJcUN?usp=sharing
     
    Last edited: Dec 1, 2018
  50. nukeustwo

    nukeustwo

    Joined:
    Sep 4, 2015
    Posts:
    51
    So the thing is deploy to device takes so long that 90% of dev time is spent in Editor, but ensuring the game looks correct before loading onto device is important so I tend to leave the game view in device specific modes. As such it'd be very useful if it'd be possible to do custom scaling in editor as well