Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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

Posted
  On 10/17/2016 at 3:35 PM, Airbuspilot said:

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

Expand  

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.

  On 10/17/2016 at 3:35 PM, Airbuspilot said:

This starts the Logging in a File.

Expand  

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.

  On 10/17/2016 at 3:35 PM, Airbuspilot said:

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

Expand  

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.

  On 10/17/2016 at 3:35 PM, Airbuspilot said:

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

Expand  

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

 

Posted
  On 10/17/2016 at 3:51 PM, 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.

Expand  

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.

  On 10/17/2016 at 3:51 PM, 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.

Expand  

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

  On 10/17/2016 at 3:51 PM, 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.

Expand  

I will try it again and send you the Log.

 

  On 10/17/2016 at 3:51 PM, 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.

Expand  

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.      

Posted
  On 10/18/2016 at 3:05 PM, 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.

Expand  

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.

  On 10/18/2016 at 3:05 PM, Airbuspilot said:

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

Expand  

It isn't enabled by default.

  On 10/18/2016 at 3:05 PM, Airbuspilot said:

I will try it again and send you the Log

Expand  

Why do I need to see a log?

  On 10/18/2016 at 3:05 PM, 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

Expand  

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

 

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.