Watching Module Varaibles
TurnipTruck
Junior Member
Greetings,
I'm new to writing modules. If you have a module running on a system that declares some variables, how do you watch those varaibles during runtime? The debug associated with the master program seems to not always show the values.
Thanks.
I'm new to writing modules. If you have a module running on a system that declares some variables, how do you watch those varaibles during runtime? The debug associated with the master program seems to not always show the values.
Thanks.
Comments
-
You can Copy/Paste the variables in the "watch" window.
-
if you defines them as LOCAL_VAR or STACK_VAR you cant watch them.
Also if you have a module that you use more than once, you will have to select one (or more) from a list. -
Locals are no problem and you can also see the Stack_Var while stepping through but you have to be in that code block of the stack_var to see it momentarily.yuri wrote:
if you defines them as LOCAL_VAR or STACK_VAR you cant watch them.
Also if you have a module that you use more than once, you will have to select one (or more) from a list. -
vining wrote:Locals are no problem and you can also see the Stack_Var while stepping through but you have to be in that code block of the stack_var to see it momentarily.
while stepping through yes, but not while the system is up and running
-
You can also highlight the variable and drag it to the debug window. If it's a variable from the parameters list, you need to watch the original in the calling code. If you have multiple instance of the module, all bets are off; I find the ambiguous reference resolution window to be unreliable. If I need to debug a multi-copy module, I comment out all but the one I need to work on.
-
DHawthorne wrote:You can also highlight the variable and drag it to the debug window. If it's a variable from the parameters list, you need to watch the original in the calling code. If you have multiple instance of the module, all bets are off; I find the ambiguous reference resolution window to be unreliable. If I need to debug a multi-copy module, I comment out all but the one I need to work on.
i think there is a way of selecting the correct variable.
Let's say you have 5 instances of 1 module. If you want to watch a variable that is defined as third instance, you select the 3rd variable from the selection list. Can anyone confirm this is the way to go? -
Variable watch for modules
I have experienced the same problem. If you have lets see four of the same tv and use four instances of the same module. Their seems to be no way to actually watch those variables.
It almost forces use the same module, just rename it slightly for all four.
The variables do not reliably show. YOu can pass the in an out of the module to a variable.
But not as simple as just watching an array or variable.
I think this is a fault of amx debug.
Any one else have this ame problem. -
yuri wrote:i think there is a way of selecting the correct variable.
Let's say you have 5 instances of 1 module. If you want to watch a variable that is defined as third instance, you select the 3rd variable from the selection list. Can anyone confirm this is the way to go?
In theory yes, but it doesn't work. Try selecting all five from different modules. Change one, they all change. It's broken, and cannot be depended on. -
And if you are unlucky it won't work at all and NS2 will simply crash whenever you try to look at a variable inside a module if that module has more than one instance.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
