List All Global Variables

Discussion in 'Questions (Windows Mobile)' started by robinathome, May 4, 2009.

  1. robinathome

    robinathome Member Licensed User

    Hello all,
    I need to debug a programme and I would like to export all Global Variables and their values to a text file. Arrays I will deal with separately. Something like
    For n = 0 to App.GlobalVariables.count-1
    filewrite(c1,App.GlobalVariables(n).name & "," & App.GlobalVariables(n).value)

    If this can work with all modules then that would be great.
    If this question has already been answered then please can you point me in the right direction.
    Last edited: May 4, 2009
  2. agraham

    agraham Expert Licensed User

    I'm afraid this is not possible as there is no collection of Global variables that can be iterated and you can't get the value of a Global variable as a property.

    If you can't for some reason debug in the IDE and can optimise compile your application you can debug it on either desktop or device with my which can (amongst other cool things) inspect and change Global variables at runtime. With the next version of Basic4ppc will come an update to this library providing single-step and breakpointing.
  3. robinathome

    robinathome Member Licensed User


    Thank you for pointing out your Debug Library and I have just tried the Watcher to find the current value(.text) of variables. This will suffice for the moment.:)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice