FlightControl Posted November 8, 2017 Posted November 8, 2017 (edited) Dear DCS community! I've written a complete manual now of the debug capability how to set it up properly... The debugger capability has now been released to the master branch of the MOOSE repository. From now on it has become an essential part of the framework. Please consult the online documentation to setup the debugger here... http://flightcontrol-master.github.i...bug_Guide.html I'll make later some MOOSE for Dummies videos to go in depth on debugging and the various stuff that you can do. Enjoy! FC Edited November 10, 2017 by FlightControl 5 [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
tintifaxl Posted November 8, 2017 Posted November 8, 2017 Couldn't rep you again - wish I could. Outstanding work for the DCS community! Windows 10 64bit, Intel i9-9900@5Ghz, 32 Gig RAM, MSI RTX 3080 TI, 2 TB SSD, 43" 2160p@1440p monitor.
HiJack Posted November 8, 2017 Posted November 8, 2017 (edited) Sven, this is just fantastic! :thumbup: I was looking in to get the debugger going but had to take a longer break. Will start up again soon. Keep it up! Edited November 8, 2017 by HiJack 1
funkyfranky Posted November 8, 2017 Posted November 8, 2017 Great stuff! This will be very handy :thumbup: A warrior's mission is to foster the success of others. i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
EntropySG Posted November 8, 2017 Posted November 8, 2017 You’re the best, Sven! We use MOOSE heavily for our missions in the 132nd! 1 [sIGPIC][/sIGPIC]
FlightControl Posted November 8, 2017 Author Posted November 8, 2017 There is still a whole lot of things to sort out on this stuff... 1. Why is it that when white spaces are contained in folders, it results in strange path strings in the debugger.lua process? This kills the debugger.lua workings. I need to do research on this. 2. How to deal with "debug mode" and "run mode". It is very complicated. Loading a script dynamically from the .miz versus embedding a script in the .miz. This really needs to be given a big thought. There will be a change required in each test mission to allow for debug mode or test mode. Each mission designer will have to follow a process to accomodate this. So the process needs to be as simple as possible. Or 10000 questions will arise and the forums will be full of discussing people (again). 3. Documentation. Videos are nice, but the setup process should be written down. The LDT should be further explained. Q&A will come. 4. What about missions you get from somebody else, how to debug those... Needs to be thought about. 5. Is debug really working correctly? Are there no crashes? The biggest challenge will be to EXPLAIN this to noob users who will really benefit from the debugger. People see MOOSE as a wall of code and complexity. While in essence, it helps them to have more fun of the sim. So, some homework is to be done to get this finished. That being said, you are all welcome to "alpha" test with me this debugging capability. If you have questions, please ask. The debugger is already helping me now to resolve issues of other people questions to give help. FC [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
SnorreSelmer Posted November 8, 2017 Posted November 8, 2017 Yay! This is awesome! I'll give this a spin as soon as it's a bit more mature! (Just starting out with MOOSE and LUA, but I'm used to this from when I coded Java and it's super useful!) 1 ASUS Z170-P w/ Intel i7-7700, 32GB DDR4 RAM, SSDs out the wazoo and a GTX 1080Ti, Oculus Rift CV1, TM Warthog stick and throttle, TM Cougar MFDs, MFG Crosswind pedals and WheelStandPro Warthog (w/ the custom small Warthog plate) Former F-16 Ground Crew @ RNoAF [sIGPIC][/sIGPIC]
FubarBundy Posted November 8, 2017 Posted November 8, 2017 VERY useful! Really, really useful Sven... should make using Moose a doddle :) 1
fargo007 Posted November 8, 2017 Posted November 8, 2017 Excellent. This will definitely help a lot in those situations where you think you are doing everything correctly, but you're not.... Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Igneous01 Posted November 8, 2017 Posted November 8, 2017 This is fantastic - is there a link i can download and try this out? How does this fare with scheduled functions setup with timer.scheduleFunction()? Often times I find any errors that happen here are not reported in dcs log. 1 Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha) http://kaukasusinsurgency.com/
FlightControl Posted November 8, 2017 Author Posted November 8, 2017 This is fantastic - is there a link i can download and try this out? How does this fare with scheduled functions setup with timer.scheduleFunction()? Often times I find any errors that happen here are not reported in dcs log.Scheduled functions can also be breakpoint and debugged. Check the first video on the moose YouTube channel. The one posted earlier. And follow the instructions. Sent from my SM-N950F using Tapatalk [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Igneous01 Posted November 8, 2017 Posted November 8, 2017 Awesome thank you so much for this, I have a massive project im working on with many files and many things going on at once, being able to debug in game when the logging fails is such a great feature to have. Do you know if this also lets you step into the DCS libraries? Like what happens if you try to step into coalition.addGroup() for example? Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha) http://kaukasusinsurgency.com/
Krebs20 Posted November 9, 2017 Posted November 9, 2017 If I wanted to learn more about coding LUA in general. Where would you recommend I look first. I'm starting down the rabbit hole of learning. I'm not ready to use a tool like this. What do I need to learn 1st? I know only enough that the breakdowns would be very helpful. I can understand the syntax somewhat. But it's like reading a language where you don't know the vocabulary. I'm starting with reading your moose site. [sIGPIC][/sIGPIC]
FlightControl Posted November 9, 2017 Author Posted November 9, 2017 If I wanted to learn more about coding LUA in general. Where would you recommend I look first. I'm starting down the rabbit hole of learning. I'm not ready to use a tool like this. What do I need to learn 1st? I know only enough that the breakdowns would be very helpful. I can understand the syntax somewhat. But it's like reading a language where you don't know the vocabulary. I'm starting with reading your moose site.There are many sources. There are some great tutorials on the web regarding lua. The best I can recommend is lua Tutorialspoint. https://www.tutorialspoint.com/lua/ Regarding moose and DCS world lua, I've created a series of lua tutorials for the DCS community... And indeed, there is a web site with links to various places on moose too. Links are in my signature. Suggest starters join our community at slack.com. it is great to share code and discuss stuff etc. But it is a closed community because slack works this way. Send me your email address in a private message and I'll join you up. Fc Sent from my SM-N950F using Tapatalk [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
FlightControl Posted November 9, 2017 Author Posted November 9, 2017 I've made some progress today. Finally white spaces are working. Sources are loading in the debugger. I also changed the way how the debugger needs to be loaded. Suggest you update MissionScripting.lua file in the Scripts folder of the DCS program files folder. So here is a quick manual of the changes. The LDT-Debug branch of the MOOSE repo on github has been added with a directory... https://github.com/FlightControl-Master/MOOSE/tree/LDT-Debug/Moose%20Development/Debugger This directory contains 2 files. 1. A revised debugger.lua file, which you need to copy into the dcs program root folder. (On my pc this is C:\Program Files\Eagle Dynamics\DCS World ). 2. A connection.lua file, which contains 3 lines of code that needs to be copied into the MissionScripting.lua file, at the place indicated in the comments of the file. 3. MissionScripting should not sanitize the io library. Comment that line out. I've attached my MissionScripting.lua as an example in this thread. So, when you have done this, and run a mission, if the debugger service is running, you'll run DCS World in debug mode ... (But you'll need to watch the first video and the second one). But you need to load your sources dynamically, from the .miz file, no way around this. As explained in the video... I've attached an example mission how to do this. Ensure your baseline of the moose code on your pc is synched with branch LDT-Debug. Also. Ensure that you setup the debugger configuration in LDT for the service to identify the sources in the workspace following "local" resolvement. (In LDT->Run->Debug Configurations...). Then your sources will be loaded correctly while stepping through your mission logic and it will work. You can setup breakpoints, watch variables, ... and debug my crappy moose code too ... So these changes make the lua debugger available for ALL lua coders. You can debug CTLD, MIST, MOOSE, your missions, you name it. Enjoy! FCMissionScripting.luaSPA-011 - Ground Ops - Simple Spawning.luaSPA-011 - Ground Ops - Simple Spawning.miz [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Delta99 Posted November 10, 2017 Posted November 10, 2017 Holy crap this is going to be amazing!!!! My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
FlightControl Posted November 10, 2017 Author Posted November 10, 2017 (edited) Dear DCS community! I've written a complete manual now of the debug capability how to set it up properly... The debugger capability has now been released to the master branch of the MOOSE repository. From now on it has become an essential part of the framework. Please consult the online documentation to setup the debugger here... http://flightcontrol-master.github.i...bug_Guide.html I'll make later some MOOSE for Dummies videos to go in depth on debugging and the various stuff that you can do. (The previous videos will be deleted as they are confusing). Enjoy! FC Edited November 10, 2017 by FlightControl [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
Hans Spaan Posted July 8, 2018 Posted July 8, 2018 (edited) Many thanks to FlightControl for his Herculean effort. Still, at the beginning of my journey in Moose space, I have Hummer spawning in a mission. This works nicely as FlightControl has described. However, if you try to load the mission dynamically nothing spawns. I've set up the debug facility according to the instruction video, which I've watched over and over again. The dynamic loading is done as follows: on mission start the following script is executed (DO SCRIPT): MOOSE.Include( "D:/LDTWorkspace/My_Missions/TestMission/","TestMisson.lua") Does anyone have an idea what is wrong? I found this in dcs.log: 2018-07-08 20:36:03.165 ERROR DCS: Mission script error: : [string "MOOSE.Include( "D:/LDTWorkspace/My_Missions/TestMission/","TestMisson.lua")"]:1: attempt to index global 'MOOSE' (a nil value) stack traceback: [C]: ? [string "MOOSE.Include( "D:/LDTWorkspace/My_Missions/TestMission/","TestMisson.lua")"]:1: in main chunk 2018-07-08 20:36:03.200 INFO Lua: Lua CPU usage: metric: average mission execution: 50.1712 % Edited July 8, 2018 by Hans Spaan excerpt fromdcs.log added
Hans Spaan Posted July 9, 2018 Posted July 9, 2018 (edited) Problem Solved Too optimistic, only dynamically loading of Moose works, the issue with loading the mission file remains. Edited July 9, 2018 by Hans Spaan problem is not resolved
dmatsch Posted July 10, 2018 Posted July 10, 2018 Please consult the online documentation to setup the debugger here... http://flightcontrol-master.github.i...bug_Guide.html dead link
Hans Spaan Posted July 10, 2018 Posted July 10, 2018 Problem Solved, really DO NOT use the MOOSE.Include function for loading the .lua file(s) for your mission. Instead you might use loadfile for example: assert(loadfile("D:/LDTWorkspace/MyMissions/TestMission/TestMission.lua"))(). Thanks to a person named " thebgpikester" who published a video on YouTube: https://www.youtube.com/watch?v=BMKBXjjKiD
Andy2828 Posted August 13, 2019 Posted August 13, 2019 I cant get the debugger to connect. It gets to 70% in Eclipse but wont connect and debug the mission. Im not sure where Im missing out. Ill be happy to provide whatever info is needed to solve this. Its very frustrating. This is what I get.... <terminated, exit value: 1>C:\Users\andyp\Documents\jre1.8.0_201\bin\java (Aug 13, 2019, 3:35:22 AM) Along with this in the console: Debugger v1.4.2 Debugger: Trying to connect to 127.0.0.1:10000 ... Debugger: Connection succeed. Exception in thread "main" com.naef.jnlua.LuaRuntimeException: ...in32.win32.x86_64\workspace\DCS MISSIONS\Border test.lua:9: attempt to index global 'SET_GROUP' (a nil value) at com.naef.jnlua.LuaState.lua_pcall(Native Method) at com.naef.jnlua.LuaState.call(LuaState.java:585) at org.eclipse.ldt.support.lua52.internal.interpreter.JNLua52Launcher.run(JNLua52Launcher.java:128) at org.eclipse.ldt.support.lua52.internal.interpreter.JNLua52DebugLauncher.main(JNLua52DebugLauncher.java:24)
MarcosR Posted October 31, 2019 Posted October 31, 2019 Anyone having issues using this? Can't make it work, and i'm not new using it.. seems to be having using the socket don't know why
Recommended Posts