Jump to content
The simFlight Network Forums

Lua Debug Line by Line


Recommended Posts

Hello together,

is it possible, to Debug a Lua Script Line by Line? I started the Script with the Lua Debug in FSUIPC Menu. This starts the Logging in a File. One Line is in the Log File. But now? What do i have to do, to get the next Line? Hope, i could express my Problem correct.

Further i would know, if it is possible, to do a Trace of the Lua Script at the Runtime with the Ability to set Breakpoints. This would be great to see, the Scripts Workflow.

Thanks in Advance for your Answers.

 

Joachim

Link to comment
Share on other sites

9 minutes ago, Airbuspilot said:

is it possible, to Debug a Lua Script Line by Line? I started the Script with the Lua Debug in FSUIPC Menu.

The "LuaDebug" assignment facility is really superceded by the far better Debug/Trace option in the Logging menu. Try that. It tells you which lines are executed and the values of variables when they are set or changed.

11 minutes ago, Airbuspilot said:

This starts the Logging in a File.

Only if you opt to have Lua logging in a separate file 9see the Logging tab). It would normally go to the FSUIPC log, so you can see the relationship between Lua actions and other FSUIPC events such as controls, buttons and offset logging.

12 minutes ago, Airbuspilot said:

One Line is in the Log File. But now? What do i have to do, to get the next Line?

Sorry, but what line is that? both Lua tracing facilities go through the whole processing of the lua plug-in. There's no step-by-step action.

13 minutes ago, Airbuspilot said:

if it is possible, to do a Trace of the Lua Script at the Runtime with the Ability to set Breakpoints.

What facilities would you use at these "breakpoints" exactly? Currently you'd need to program these in as extra lines in your plug-in.

Pete

 

Link to comment
Share on other sites

22 hours ago, Pete Dowson said:

The "LuaDebug" assignment facility is really superceded by the far better Debug/Trace option in the Logging menu. Try that. It tells you which lines are executed and the values of variables when they are set or changed.

My Problem with this is the small Window and Font in FSUIPC. My Eyes are sick and i need a bigger Font. If possible, i would highly appreciate, if you would overhaul the Window in this Part. Maybe i am not the only one, who needs it.

22 hours ago, Pete Dowson said:

Only if you opt to have Lua logging in a separate file 9see the Logging tab). It would normally go to the FSUIPC log, so you can see the relationship between Lua actions and other FSUIPC events such as controls, buttons and offset logging.

I don't know, if i opt that in or if it was set at the Installation Process.  

23 hours ago, Pete Dowson said:

Sorry, but what line is that? both Lua tracing facilities go through the whole processing of the lua plug-in. There's no step-by-step action.

I will try it again and send you the Log.

 

23 hours ago, Pete Dowson said:

What facilities would you use at these "breakpoints" exactly? Currently you'd need to program these in as extra lines in your plug-in.

As an older Cobol Developer, i am using IBMs Rational Developer for System Z. If i will trace a Programm at the Runtime, i can set Breakpoints to temporary stop the Programs Workflow. It is possible, to monitor, set or change a Variables Value and then continue the Workflow. So it is possible, to check the Programs Behavior depending on a Variables Value and the Workflow of the Program itself. Also i can set the Font Options to have more convenience for my Eyes.      

Link to comment
Share on other sites

27 minutes ago, Airbuspilot said:

My Problem with this is the small Window and Font in FSUIPC. My Eyes are sick and i need a bigger Font. If possible, i would highly appreciate, if you would overhaul the Window in this Part. Maybe i am not the only one, who needs it.

I don't set any font size -- it is watever you have set Windows to, and should be exactly the same as pretty much everything else.

The problem if I override what the user sets is that the dialog window gets too big to fit some folks screens.

No one else has complained as far as I recall. Have you thought about changing your Windows font size? Folks with such difficulties usually do. This is especially important if you are using a very high resolution screen -- on 4k displays the default is minute. 

And that's another way of automatically getting a bigger font -- reduce the resolution being used on the screen.

27 minutes ago, Airbuspilot said:

I don't know, if i opt that in or if it was set at the Installation Process.

It isn't enabled by default.

27 minutes ago, Airbuspilot said:

I will try it again and send you the Log

Why do I need to see a log?

27 minutes ago, Airbuspilot said:

If i will trace a Programm at the Runtime, i can set Breakpoints to temporary stop the Programs Workflow. It is possible, to monitor, set or change a Variables Value and then continue the Workflow

Yes, I understand that sort of debugging (I am actually a programmer and have been since 1963), but it would be a huge development for me to undertake in FSUIPC. Sorry. You can obviously do what you want by adding suitable code into your Lua plug-in, but if it is getting so complex that this is necessary I would think it is getting beyond a plug-in application and more something for an external program. Remember the plug-ins are running inside the sim. Also the Sim doesn't stop when you stop a plug-in -- they are running as separate threads, so all sorts of external factors are changing.

Pete

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.