Jump to content

Debug log improvements


Recommended Posts

The debug log view is an incredible boon when developing a mod. Really handy. A few additional tweaks would make it even handier.

[B]Stack trace.[/B]
When it logs an exception: Please include the stack trace in the logged message? [I]Please[/I]? Telling me that "some code somewhere, in somebody's DLL (maybe mine, maybe not), threw a NullReferenceException" is not particularly helpful.

[B]Log message filter.[/B]
Unfortunately, there's just one log, and everything writes to it, and it scrolls past, and often when I'm debugging I would really really like to filter the view so that it only shows the lines I'm interested in.

It would be really nice if that tab had a little edit box at the top where you could type a string, and it would filter the view to only show messages that include that string. (Bonus points if you can actually put a regex in, but I'd settle for a simple literal string).

[B]State persistence.[/B]
This last one is a fairly minor nit, but it would remove a source of annoyance. It would be nice if the debug menu could remember its location from one play session to the next, and also remember its am-I-scrolled-to-the-bottom-or-not state. Debugging a mod involves endless cycles of "make code change, rebuild, copy DLL, restart KSP". Every single time, after pulling up the debug menu, I need to drag it to where it needs to be and then drag the scrollbar button to the bottom. Yes, I know, it seems like a little thing, but it gets kinda old when I'm on the umpteenth iteration of restarting the game and every little bit helps. :)
Link to comment
Share on other sites

With your first point, it already does. In your settings file, there's a VERBOSE_DEBUG_LOG option that when set to true, does show the full stack trace. That, and then click on any line that you want to look at more to expand it out.
Link to comment
Share on other sites

  • 3 weeks later...
On 11/25/2015, 10:27:36, hermes47 said:

With your first point, it already does. In your settings file, there's a VERBOSE_DEBUG_LOG option that when set to true, does show the full stack trace. That, and then click on any line that you want to look at more to expand it out.

Thanks.  Took some fiddling to figure out, it's a little button that shows up at the far right of each line.  Clicking on that gives the expansion.

Thanks for the tip!

Edited by Snark
Link to comment
Share on other sites

On 11/25/2015, 8:40:11, Snark said:

[snip]

Debugging a mod involves endless cycles of "make code change, rebuild, copy DLL, restart KSP". Every single time, after pulling up the debug menu, I need to drag it to where it needs to be and then drag the scrollbar button to the bottom. Yes, I know, it seems like a little thing, but it gets kinda old when I'm on the umpteenth iteration of restarting the game and every little bit helps. :)

Depending on what you're working on, you could try my solution to this problem. I haven't had a lot of feedback on it so far but it's increased my turnaround time dramatically

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...