Jump to content

THE DEBUGGER - Interactive Mission Debugger


cfrag

Recommended Posts

Current Version: 2.1.0 - 20240122

Download Link: Here

image.png

THE DEBUGGER - DCS Interactive Mission Debugger


"The Debugger" is an interactive debugger for DCS missions, meaning that it enables you to view, set and observe flags (i.e., you are alerted when the value changes), track and inspect events, spawn smoke and units on the map, and read, analyze and change Lua tables/variables -- all while the mission is running. "Observing" is particularly useful, as it can watch flags for you, and shows you only the changes:

image.png

It supports advanced features such as snapshot/compare and provides Mission Editor integration for debugging pre-sets, so the mission can start with flag observers in place and running, saving you lots of time and nerves.

Since it's an interactive debugger, you can issue commands to the debugger at mission run-time. As DCS has no 'console' for users to enter commands, the debugger commandeers the 'Map Marker' functionality for this purpose.

 

image.png

To issue one of the many commands, place a map marker, and type the command as text. All debugger commands start with a hyphen, e.g. '-show kills'.

image.png

When you click outside the map mark, the debugger executes the command. If successful, the mark disappears, and an acknowledgement is displayed as text.

image.png

To get an overview of what the debugger can do, issue the '-help' command. 

image.png

The debugger comes with full documentation and an accompanying demo mission to illustrate some of the finer points.

This version 2 is greatly expanded from 1.x, and finally eradicates a long-standing intermittent bug that could crash DCS after quitting a mission (my great thanks to @Mistermann for helping me with tracking down this one)


NOTE:
This is the stand-alone version of DML's debugger. It is self-contained and does not require that you add DML to your mission. If you use DML, a (probably more recent) version is included with the standard DML distribution.

(If you are wondering: DML is a modular mission toolbox for DCS)

Enjoy,

-ch

 


Edited by cfrag
  • Thanks 2
Link to comment
Share on other sites

  • 2 weeks later...

Update 1.1.0 - 20220722

Now supports writing the session's debug log to disk as a text file

image.png

So, when you give the -save command

image.png

it will respond with 

image.png

Optionally, you can give your own file name and the log will be saved under that name

The save feature requires that you de-sanitize lfs and io first (see documentation). If you don't, the debugger merely complains, and will continue.

The resulting text file can be run through any standard text analysis/compare tool and may look like this:

cfx debugger v1.1.0 started.
interactive debugDemon v1.1.0 started
  enter -? in a map mark for help
---debug: 08:00:10 -- Flag t1 changed from 0 to 2 [many flags]
---debug: 08:00:11 -- Flag 5 changed from 0 to 2 [many flags]
t1 is now equal to four! [08:00:12]
---debug: 08:00:12 -- Flag t1 changed from 2 to 4 [many flags]
---debug: 08:00:15 -- Flag t1 changed from 4 to 6 [many flags]
*** [08:00:19] debug: inc flag <seq> from <0> to <1>
---debug: 08:00:19 -- Flag seq changed from 0 to 1 [gndObserver]
---debug: 08:00:22 -- Flag gnd2 changed from 0 to 1 [gndObserver]
---debug: 08:00:27 -- Flag gnd1 changed from 0 to 1 [gndObserver]
---debug: 08:00:32 -- Flag gnd3 changed from 0 to 1 [gndObserver]
---debug: 08:00:38 -- Flag hog changed from 0 to 1 [gndObserver]

-ch


Edited by cfrag
Link to comment
Share on other sites

@cfrag - thank you, sir! 

 

 


Edited by Mistermann

System Specs:

Spoiler

 💻Processor:13th Gen Intel(R) Core(TM) i9-13900K - 🧠RAM: 64GB - 🎥Video Card: NVIDIA RTX 4090 - 🥽 Display: Pimax 8kx VR Headset - 🕹️Accessories:  VKB Gunfighter III MCG Ultimate, Thrustmaster TWCS (modified), Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box 

Thrustmaster TWCS Mod

 

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
7 hours ago, F4ttyRider said:

When I tried this, I got this error message during loading the mission. DCS version is the newist Open Beta.

Thank you for the heads-up. I thought that this error was fixed in the latest release (it's an oversight in the persistence code that attempts to start up and too late realizes that your DCS isn't sanitized - which it does not have to be). Which version of Debugger are you running?

-ch

Link to comment
Share on other sites

35 minutes ago, cfrag said:

Thank you for the heads-up. I thought that this error was fixed in the latest release (it's an oversight in the persistence code that attempts to start up and too late realizes that your DCS isn't sanitized - which it does not have to be). Which version of Debugger are you running?

-ch

The latest stand-alone version.

P8P67 Deluxe, i7 2700k@4700MHz, 32GB, GTX1080Ti, Win10, HP Reverb G2, TM Hotas from 2002 serial:03070.

Link to comment
Share on other sites

On 11/28/2023 at 6:06 PM, cfrag said:

Here's an early version of the new 2.0 debugger. it does all the stuff that the docs say, plus some new stuff that I'm about to document 🙂 

Can I trouble you to see if that one works for you?

 

Mission Debugger 2.0 exp.lua 302.83 kB · 1 download

 

A breakthrough!! It works, no errors. Thank you!


Edited by F4ttyRider
  • Like 1

P8P67 Deluxe, i7 2700k@4700MHz, 32GB, GTX1080Ti, Win10, HP Reverb G2, TM Hotas from 2002 serial:03070.

Link to comment
Share on other sites

Update 20240122 - Version 2.1 - Major Update

So finally, after tracking down some sinister issues -- which @Mistermann helped me to squash -- version 2.1 of The Debugger is ready for prime time. 

Here's a brief rundown of what I added, more info in docs:

  • Event monitoring: tell the debugger to track events and it tells you when they occur
  • Inspect the event record - don't know the event's payload? Let the Debugger have a peek at it
  • Spawn units - the Debugger has a 'generic' spawning system that allows you to quickly spawn (a lot if you want) units anywhere on the map:
    image.png
    spawns 25 blue IFV on the map where your marker is 
  • read and analyze LUA tables
  • CREATE AND CHANGE LUA TABLES -- DANGER DANGER DANGER -- don't mess with this unless you know what you are doing!

And many more cool stuff that I forgot.

Have fun, and squash those bugs! [Starship Trooper reference removed]

-ch

 


Edited by cfrag
  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...