May 23, 2017 at 20:43 #11274
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.
–ErasmusMay 24, 2017 at 02:18 #11277
Please try using the “Export to CSV” button in the Live Variables tool window.May 24, 2017 at 19:25 #11291
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.May 26, 2017 at 04:45 #11303
Thanks, this actually looks like our bug. Please try this build: http://sysprogs.com/files/tmp/VisualGDB-18.104.22.1684.msiMay 26, 2017 at 20:59 #11312
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 ;).May 27, 2017 at 16:40 #11317
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.June 1, 2017 at 22:56 #11373
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.June 2, 2017 at 01:37 #11376
Thanks for clarifying this. Just to confirm, you are not looking into exporting historical data, but rather a contents of a large array, right?June 2, 2017 at 18:18 #11382
Correct. So add a variable to live variable display, say int Foo, run program and hit break point. Examine Foo and export contents (100 integers) to csv file.
Thanks!June 3, 2017 at 04:43 #11394
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”.June 13, 2017 at 01:05 #11459
I actually tried Visual Watch prior to Live variables. Not able to add any variables to Visual Watch – with either new or production VisualGDB.June 13, 2017 at 02:34 #11463
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?June 15, 2017 at 00:14 #11481
It is ~80 .c files.June 15, 2017 at 00:24 #11484
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.
You must be logged in to reply to this topic.