Author Topic: Why was the debug window removed?  (Read 4149 times)

0 Members and 1 Guest are viewing this topic.

Offline Yarn

  • 210
Why was the debug window removed?
I noticed that the debug window (which shows what's being written to fs2_open.log, but in real time) was removed sometime after FSO 3.7.4. What was the reason for this?
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: Why was the debug window removed?
Because it was, so far as I know, platform specific to Windows. What good is a debug window that can't be used by a large portion of the user base?
There are only 10 kinds of people in the world;
those who understand binary and those who don't.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Why was the debug window removed?
Because it was, so far as I know, platform specific to Windows. What good is a debug window that can't be used by a large portion of the user base?
Being Windows-specific isn't reason enough by itself to remove a feature. The commit from Antipodes that, as far as I can tell, removed it, claimed it was "unused".
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline m!m

  • 211
Re: Why was the debug window removed?
When I cleaned up the outwnd code (the code that is responsible for the debug log) I looked at the debug window code and determined that the code to enable it could never be reached and in my tests it wasn't ever reached. I have no idea how it could have worked before but it may have required some special driver support since it uses some very weird Windows API calls.

I have been thinking about how to reimplement this in a cross-platform way but since we have entered a code freeze now that won't appear in the next release.

 

Offline Axem

  • 211
Re: Why was the debug window removed?
I too, mourned its loss. But I did find some other programs to use in the interim. Programs like tailforwin32 or Snaketail, or even just notepad++ if you already use that (you might need to tick a few other settings first though).

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Why was the debug window removed?
The debug window was activated from the debug console, or by commandline.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Why was the debug window removed?
If multiple devs were using a feature that the commit message claimed was 'unused', why didn't anyone speak up back then?    :confused:
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Why was the debug window removed?
How often do you read through the entire wall of commit messages when you are pulling from master?

When I'm focused on a project, I usually don't bother reading the commit messages unless there's a conflict or the changes affected files I'm messing with.


Also, another outwindow that's missing was the joystick raw position data, now I know what happened to it.


At any rate, seeing as the outwnd was Windows specific, now would be a good time to bring up the possibility of making it cross-platform using SDL. Granted, we're in code freeze stage, so the changes would have to be done after the more pertinant bugs have been squashed.
« Last Edit: January 15, 2017, 11:21:43 am by z64555 »
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Why was the debug window removed?
I just read all the nightly logs and/or the github merge emails.  Keeps me pretty up to date anyway.  But also I would have thought any users would have noticed it's removal earlier and said something, even if they didn't see the commit.  That was probably the assumption made during its removal too.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline m!m

  • 211
Re: Why was the debug window removed?
A cross-platform solution is a bit complicated since FSO isn't set up to handle multiple windows at the moment. I have done some work in order to make this possible so implementing the debug window shouldn't be an impossible task but it will require some changes to the graphics engine.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Why was the debug window removed?
I wonder if a cross platform solution never really seemed necessary because *nix has "tail -f".  Can just run that in a terminal window alongside fso, sounds like that's what this feature accomplished.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline m!m

  • 211
Re: Why was the debug window removed?
You can do something similar on Windows (Axem showed how to do this) but I would like to extend this second window further once it has been implemented. It would be great to have a second window where the debug console would be displayed so that you wouldn't have to pause the gameplay to use the debug console anymore.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Why was the debug window removed?
If multiple devs were using a feature that the commit message claimed was 'unused', why didn't anyone speak up back then?    :confused:
Because it was removed in Antipodes, and not a lot of people tested Antipodes until it was merged with master, and how many people looked through that entire changelog?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline m!m

  • 211
Re: Why was the debug window removed?
I have reimplemented the debug window with techniques that will work on all platforms:



Since we are currently in a feature freeze period it's not certain that this feature will be merged before the 3.8 release but after that I will definitely submit it for review.

 

Offline m!m

  • 211
Re: Why was the debug window removed?
My changes have been merged into the master branch so the new debug window should appear in the next nightly. Please report any issues you encounter.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Why was the debug window removed?
I just read all the nightly logs and/or the github merge emails.  Keeps me pretty up to date anyway.  But also I would have thought any users would have noticed it's removal earlier and said something, even if they didn't see the commit.  That was probably the assumption made during its removal too.
It seems to be a reoccuring theme with the SCP that things are just assumed, and not properly communicated...
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Yarn

  • 210
Re: Why was the debug window removed?
You forgot to add -debug_window to the list of command-line options that's sent to the launcher.

I tried the new debug window and immediately noticed some problems:
  • The window fills the screen and isn't resizable.
  • The debug window initially has focus over the game window. I think it should be game window that has focus.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline m!m

  • 211
Re: Why was the debug window removed?
You forgot to add -debug_window to the list of command-line options that's sent to the launcher.
IIRC, that's how the previous version also presented itself. I assumed that there was a good reason for this decision so I did the same thing.

  • The window fills the screen and isn't resizable.
What default size would you recommend? It's very hard to figure out a good default for these things so I just chose to let it fill the screen.

  • The debug window initially has focus over the game window. I think it should be game window that has focus.
I guess this could be fixed.

 

Offline Yarn

  • 210
Re: Why was the debug window removed?
IIRC, that's how the previous version also presented itself. I assumed that there was a good reason for this decision so I did the same thing.
No, the option for the old debug window appeared in the launcher. (If you don't believe me, select a 3.7.4 build in a launcher and look under the Dev Tool section; you should see an option labeled "Display debug window.")

What default size would you recommend? It's very hard to figure out a good default for these things so I just chose to let it fill the screen.
I think 800x600 might be a good place to start. If that's too small, you could make it a little bigger, but I wouldn't go much bigger; not everyone has a high-resolution screen.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline m!m

  • 211
Re: Why was the debug window removed?
I fixed the issues you reported. Here is the PR for that: https://github.com/scp-fs2open/fs2open.github.com/pull/1152

Fixed window sizes almost never work so I made the size of the debug window dependent on the size of the display it was created on. I also made the window resizable which should improve usability.