Should I finish my Developer Console rewrite?

I made the current dev console 2 years ago during my internship, and I’ve been working on this rewrite here and there since then.

Today I solved the log filtering and TextWrapped problem for massive logs (1m+ lines).
Word wrap and the filter types are all generalized as log/message transformations, so it’s simple and much faster than the current dev console. Once everything is calculated, scrolling is lag-free even for massive logs.

Calculating Word Wrap on hundreds of thousands of lines is usually slow, but I solved this by making it load over time for massive logs. I also made it so you can find and hide multiple things at a time.
20170902_091902_036_RobloxGameClient

You can zoom by using ctrl+mouse wheel, or by pinching on mobile. (window resizing and stuff also works on mobile)

It uses a few things I came up with while programming shard seekers, so its dependencies are efficient and elegant. (This applies to way more than just real-time color changing lol)


For example it makes it possible to set permissions after the console starts up. (Extremely important if web requests are being done)

It would be pretty easy to add a feature that lets you view the local logs of other players, or re-implement some the newer tabs. Imagine searching through your entire server log history :exploding_head:

With all the recent dev console updates it’s been getting messy and laggy. I’ve been working on my game full time, but I really enjoy doing technical stuff like this; there is so much more I could do…

Edit: Fixed dead gyazo links. I have the original mp4 for the first one but the file is too big.

34 Likes

I would certainly enjoy better debug tools – you should absolutely finish it. Some feedback:

  • A “Hide Copies” option is bloat. They should be automatically combined like the output with the timestamp showing the most recent occurence
  • UI appearance could use a facelift

I worked on something similar that tackles the developer’s consoles biggest flaws. Implementing its features into your rewrite would make for a really powerful tool:

  • Logs from before you joined are showed (the developer console doesn’t replicate existing server errors on join)
  • You can view other clients’ logs
  • Logs involving clients are generalized so they display as <Player>.Character.Tool.Script : ErrorMsg
    • This makes it easier to combine duplicate errors
    • I also log “AffectedPlayers” when I parse their names out. Currently I only increment a counter, but you could show the actual affected players as well
  • Stack traces of errors are hidden until the error is selected, which clears up clutter
  • Duplicate logs are automatically combined
  • Duplicate stack traces are ignored. Different stack traces for the same error are logged.
  • Model itself automatically filters out garbage logs like “Replication: Can’t create default object of type x”
  • Developers can set custom permission (who gets to use console) callback
  • Server age and cumulative player counter

Here are some features I wanted to implement but never got around to as well:

  • Log errors to the DataStore + a plugin interface to view/search them
  • Advanced filters (not what’s pictured in this post, but Google-like searching where we can control exactly what we search with quotations, etc)
  • Ability to save filters to DataStore so they can be reused later (important for longer advanced filter strings)
  • Ability to set up alerts for logs with filters
    • Log to special DataStore key which the plugin will auto-notify for when the place is opened up
    • Popup to developers in-game
    • Log to some 3rd-party service which can ping developers
10 Likes

This is awesome! Also, maybe an “Export to Discord” ability would be nice?

Everything you showed looks really neat to have. For the resize thing though, I don’t think I’d use it a lot, I might even find it annoying if that accidentally triggers. Maybe it would be an idea to have an overview widget in the corner somewhere that shows a really zoomed out version of the text and that lets you click to jump to sections. (then you can see the zoomed out + original in the same window)

2 Likes

You should DEFINITELY complete this and push to make it a ROBLOX feature.

The real time permission giving won me over. :heart_eyes:

1 Like

A better way to go about it would be allowing logs to be dumped to a .TXT file on the local user’s machine.

Even better would be the ability to allow the dumping of server logs via localscript.

LogService:RequestServerLogDump(params here)

LogService would check that the user has permissions to access the server side.

3 Likes

External debugging is against Discord’s Terms Of Service, so this couldn’t really be implemented :frowning:

1 Like

It’s fine actually so long as they don’t hit the rate limits.

https://devforum.roblox.com/t/discord-and-trello-api-communication-bots/49670/14

2 Likes

It wouldn’t be to hard to allow you to select lines that you can copy and paste into another editor if roblox added a clipboard API for corescripts.

This option is useful because it applies globally, instead of just to adjacent messages, so you can skim for unique errors. Although I do agree that it bloats the UI and should be hidden under a more advanced section somewhere. The UI definitely needs to be reworked in some way if I’m going to add local logs from other players.

I think the scrollbar on the right with the resize dragger at the bottom works well, but the gear should probably move up next to the exit button so it doesn’t obstruct options. I also want to add a button at the top of the window that lets you initialize multiple dev consoles, so you could watch the server and local log at the same time, or compare stats.

Based on requests it seems like the developer console is going to need a server-side companion script for and transmitting compressed log data from other clients, and I’m not sure if CoreGui’s can do this. If not I could release it as a free model.

When it comes to huge logs the problem is memory usage. My new console has a memory error when enabling WordWrap at roughly 5 million lines, which is pretty good considering. Lua is great for this, because identical strings are always reused in memory. Finding and optimizing for common message formats might be important though, stack traces mainly come to mind. 'LogSync’s as I call them, have time to process adjacent messages in batches before changes are flushed asynchronously by the log GUI, so I could reuse stack traces and combine them with their error message. Doing so would require another ‘LogSync’ filtering layer to process the single packed message into multiple lines, similar to how the WordWrap layer divides messages into multiple lines based on message length (which requires loading time for massive logs.) Making the console a tiny bit slower for the sake of keeping a small memory footprint is probably worth it, especially if it’s only noticeable on logs with 50k+ lines.

I’m pretty sure my log is faster than notepad++ anyways (even though it’s written in lua :joy:)

1 Like

Yep, I ran into this issue as well with the tool I released. My solutions were:

  • Combine every duplicate error (regardless of whether they happened subsequently)
  • Try to identify duplicate errors from different places (e.g. EchoReaper.Backpack & Tomarty.Backpack → <Player>.Backpack)
  • Ignore garbage errors (the ones that get spammed are often “texture failed to load”/etc and aren’t related to our code)
  • Try to automatically detect duplicates I haven’t manually defined by comparison matching (never implemented)

With this, games rarely run out of memory because instead of 5 million error entries, you’re just logging 10 and storing counters for 200,000, 3,000,000, etc. In the case they do, then you can start truncating and if it ever gets to this point someone can make a bug report for either why the developer console isn’t detecting duplicates or why ROBLOX is spamming so many unique errors.

2 Likes

Absolutely, there’s a lot of stuff the Developer Console needs that it doesn’t have at the moment.
Personally, I’d really like dedicated customization that follows you no matter what game you’re in, such as colors.

1 Like

Ah, interesting