This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Exerro's profile picture

[help] local variables in environments

Started by Exerro, 24 April 2013 - 06:24 AM
Exerro #1
Posted 24 April 2013 - 08:24 AM
Hi,

I know this may sound like a stupid question but is it possible to access local variables when you are running a program/piece of code in an environment
Wilcomega and I are trying to make something where you can see variables and edit them ( http://www.computercraft.info/forums2/index.php?/topic/12407-bluebugger-the-best-debugging-tool-invented/ ) but it will not show the local variables which may be a problem
I was thinking maybe env.local or something but that didn't work, and i'm really stumped

Thanks in advance
MysticT #2
Posted 24 April 2013 - 08:45 AM
No, local variables are not saved in the environment. The only way to access local variables is to be in the same scope (function, loop, etc.) or using the debug library (wich is not available in CC).