Beginning Lua Programming by Kurt Jung Aaron Brown
Author:Kurt Jung, Aaron Brown
Language: eng
Format: epub, pdf
ISBN: 9781118079119
Publisher: Wiley Publishing, Inc.
The Debug Library
The debug library includes various functions for looking under the hood of Lua code. These functions are available in the table debug.
Use the debug library with caution. Its functions violate the normal rules of what values and variables are accessible from where. These functions can also be slow. Unless you are writing a debugging tool or something else that needs to poke around in Lua's guts, you probably don't want to use the debug library.
All of the functionality described in this section is also available from C. In cases where speed is important, you may want to work from C rather than Lua.
Inspecting and Manipulating Running Code
Some of the debug library's functions enable you to look at and alter running functions and their variables. In the following Try It Out, you use these functions to access local variables that are not in scope.
Try It Out
Accessing Out-of-Scope Locals
1. Type the following into the interpreter:
I = "global" function Inne local I = "inside Inner, outside loop" for I = 1, 10 do if I == 5 then debug.debug() end print("I (inside loop): " .. I) end end function Outer() local I = "inside Outer" Inner() end
Download
Beginning Lua Programming by Kurt Jung Aaron Brown.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7313)
Supercharging Productivity with Trello by Brittany Joiner(6572)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6335)
Inkscape by Example by István Szép(6189)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(5888)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(4882)
Design Made Easy with Inkscape by Christopher Rogers(4582)
Customizing Microsoft Teams by Gopi Kondameda(4123)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3932)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3715)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3665)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3589)
Pandas Cookbook by Theodore Petrou(3569)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3369)
TCP IP by Todd Lammle(2982)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2910)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2857)
Work Smarter with Microsoft OneNote by Connie Clark(2842)
