VisualGDB: Saving live variables from VS to disk

Sysprogs forums Forums VisualGDB VisualGDB: Saving live variables from VS to disk

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #11274
    erasmus
    Participant

    We’ve been using VisualGDB for a month here.  Works great for us in general -but would like to be able to save live variable data from Visual Studio/VisualGDB to a file on host/PC disk.   Tried enabling the detailed log, but data was not saved there.

    Thanks!

     

    –Erasmus

     

     

    #11277
    support
    Keymaster

    Hi,

    Please try using the “Export to CSV” button in the Live Variables tool window.

    #11291
    erasmus
    Participant

    I tried using the “export to CSV” in Live variable display. It pops up a warning saying “no variables selected”. I don’t see where to select the variable for export? Just highlighting, checking enable or setting break point does not seem to matter.

    #11303
    support
    Keymaster

    Hi,

    Thanks, this actually looks like our bug. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.3.1.1554.msi

    #11312
    erasmus
    Participant

    I tried the new VisualGDB build. The ‘Save to CSV’ file now saves a file when a variable is selected in the Live Variable display. Unfortunately the file it save is empty.

    A few other notes.

    1) Each variable selected seems to open a new file. So for instance if you have a buffer FooBuff (from Live Variables display) that is 100 elements long, selecting all 100 elements in FooBuff would create 100 files. I just want to select FooBuff and have it save the whole vector to one file.

    2) This is a nit – but it takes 20-30 seconds to start Visual Studio when ‘large’ vectors (100 elements) are added to the Live Variables display. It appears that much of this time is because the vectors are expanded in the display (e.g. – all the elements of FooBuff would be expanded an shown after VS starts.

    3) Currently there does not seem to be ANY way to save debugger variables to disk. So you can either copy manually from the debugger or fire-up your favorite OCR program ;).

    #11317
    support
    Keymaster

    Hi,

    Looks like there might be a slight confusion. The Live Variables window allows tracking how the value of a single variable changes over time and saving this history (you need to enable plotting for the variables you want to save as otherwise VisualGDB won’t record any history).

    If you want to plot a value of a large array at a single point in time, please use the Visual Watch instead of Live Variables.

    Another option would be to use the advanced memory window. It can highlight variable boundaries and save selected ranges to binary files.

    If this does not help, please let us know what are exactly you trying to accomplish and we will suggest the best way to do it.

    #11373
    erasmus
    Participant

    A couple comments.

    1) For small embedded systems, there may Not be another good way to get a snapshot of a variable out of a device.

    2) When collecting debug information for Other people to see – it is important to be able to save a snapshot of a large variable to a CSV text file. Often this data gets input to matlab or other for additional processing and perhaps complex graph/charting.

    This is a very different Use case then debugging for code problems/issues.

    #11376
    support
    Keymaster

    Hi,

    Thanks for clarifying this. Just to confirm, you are not looking into exporting historical data, but rather a contents of a large array, right?

    #11382
    erasmus
    Participant

    Correct. So add a variable to live variable display, say int Foo[100], run program and hit break point. Examine Foo and export contents (100 integers) to csv file.

    Thanks!

    #11394
    support
    Keymaster

    Hi,

    You can do that by opening Debug->Windows->Visual Watch (not Live Variables), adding “Foo” to the visual watch list, right-clicking on it and selecting “export data”.

    #11459
    erasmus
    Participant

    I actually tried Visual Watch prior to Live variables. Not able to add any variables to Visual Watch – with either new or production VisualGDB.

    #11463
    support
    Keymaster

    Hi,

    This could be our bug. Are you able to reproduce this with a basic “Hello, world” project, or does it only happen for a certain big project?

    #11481
    erasmus
    Participant

    It is ~80 .c files.

    #11484
    support
    Keymaster

    Hi,

    This could be caused by some non-typical data types or rare combinations of settings. If you could describe how exactly you are using the Visual Watch, what do you expect and what actually happens, we should be able to suggest a way to get it to work.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.