3

I'm currently porting some huge arithmetics from MATLAB to C++ including vast amount of data. I would like to step over C++ code in VS and compare contents of the key arrays with ones from MATLAB code being debugged simultaneously. Since there are many steps, it's very ugly to use some real C++ code for exporting values.

So, is there some convenient way to export content of known memory buffer from C++ to whatever? The only thing I can think of is to copy content of watch window. Some better ideas?

Update: Found >d command in Command Window. Almost fit my needs except 1) disturbing metainfo typed alongside with output, 2) only 10000 lines of output is possible :-|

3
  • I'm confused... you want to export data from a running C++ program without using C++ code? What is wrong with just writing your data to a file? Commented Sep 6, 2011 at 9:14
  • As I wrote, there are lots of simple statements, varying the same data. I don't know which statements are wrong, so I should save data after every statement. It is possible, yes, but I'm looking for more pleasing solution. Commented Sep 6, 2011 at 9:31
  • So what you are looking for is an interactive data dump of debugging info? I don't know how to do that... good luck though. :) Commented Sep 6, 2011 at 9:38

1 Answer 1

2

After all, I was able to use >d command along with slight "packing" of my data to fit more in one string and performed several dumps. Since it was the one-moment task, solution is appropriate.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.