Jump to content
JB47394

Script errors in debug console's immediate evaluation lines

Recommended Posts

Here's a feature request that others might appreciate - and if I've missed the ability to configure this, please let me know.

 

When typing into the debug console's immediate evaluation lines, scripting errors are sent to the report file.  So as I'm typing, and the script is in some malformed, intermediate state, the report file is being bombarded with script errors, one per frame, polluting whatever other information I was routing there via diag_log commands and such.  If I left a command in one of those immediate evaluation lines at the end of the prior session that doesn't make sense at the start of a new session, the log file is again bombarded.  It would be very nice if the immediate evaluation lines didn't do this.

 

I could work around the problem by composing my commands elsewhere and then pasting them into the lines, but that's a workaround, and a hassle.

 

Ideally, the script in the line itself would not log errors while anything that it called, would.

 

Oh, and if you could indicate errors in the immediate lines via an icon instead of flashing, that would be great.  You're going to trigger epileptic seizures with that strobing effect.  If you do the icon, have it show the frequency of errors over the last 1 second (or some such interval).  If the line has been evaluated 60 times in the last interval and it generated an error every time, show a red icon.  If 50% of the time, a yellow icon.  And so on.

Share this post


Link to post
Share on other sites

I wouldn't want the 'watch' lines to not produce script errors, they have helped to easily identify mistakes in my code which may not have been found with such ease. If you need to easily access information in the log file, you can always prefix your diag_log string with something that can easily be searched for with Ctrl + F.

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, MrCopyright said:

If you need to easily access information in the log file, you can always prefix your diag_log string with something that can easily be searched for with Ctrl + F.

 

That's not a reasonable workaround.  Just as you rely on the watch lines generating errors, I rely on being able to do visual pattern matching on log files.  It's not a case of simply locating one line, but of seeing a pattern in many lines.  If the lines that I'm trying to examine are interspersed with piles of immediate evaluation errors, I cannot see the pattern.  I'd also like to turn off the Bohemia report garbage as well.  This is akin to being able to control exception reporting in Visual Studio.

 

Alter my request to be that the line doesn't evaluate so long as the user has focus on that line.  So if I click on the line, it stops evaluating.  While I edit, it doesn't evaluate.  If I click off the line (or hit Enter, which causes focus to leave the line), it starts evaluating again.

 

The important thing here is to stop evaluating code for validity when it that hasn't been completely written.

Share this post


Link to post
Share on other sites

Write the code into the console area above the evaluation lines then copy and paste it in. Cutting and pasting takes, what, 2 seconds? 

Share this post


Link to post
Share on other sites

The benefits of having script errors far outweigh your need of having a "clean" log file. If it is really that much of an issue, you can always do as @beno_83au said.

Share this post


Link to post
Share on other sites

I prefer using the watch lines with very simple expressions or variables only. 

Anything complex I put in the console  for a manual exec. This means if there is an error in my code I'll most likely catch it in game (using - showScriptErrors) without ever switching to the RPT. 

Share this post


Link to post
Share on other sites
22 hours ago, JB47394 said:

I rely on being able to do visual pattern matching on log files.

Get yourself a decent tail program that can highlight/filter log contents there are several out there.

Or even powershell can do it.

Get-Content "F:\My Documents\Arma 3 - Other Profiles\RPT\arma3_x64_2017-06-28_06-10-53.rpt" -wait | where { $_ -match "myLogPrefix” }

Share this post


Link to post
Share on other sites
3 hours ago, ceeeb said:

I created a bug report about this issue in 2013. It's assigned but that doesn't seem to mean anything.

 

 

Thanks, Ceeeb.  Yes, I've noticed that lots of reports seem to go untended for years.  It doesn't inspire much enthusiasm for adding new ones.

 

As for the rest of the suggestions, thanks, but I can work around the problem as well as the next man.  The point is not to work around it, but to get it fixed - because it's a flawed implementation.

Share this post


Link to post
Share on other sites

I wouldn't say that it's flawed and needs fixing though. Maybe that's the reason the "bug" report hasn't moved, as it works exactly as intended and so the report was just forgotten about. 

 

Maybe a better question to be asking would be if it's possible to enable/disable the feature with something like a check box next to the code execution buttons. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×