2

I have an error which is occurring only very late in my code (after it's been running for ~20 minutes) and so trying to pinpoint exactly where it is is tricky because I have a lot of recursive function calls and if I go too far the important variable values may have been changed. Is there a way I can set a kind of save point where all the variables have their values saved and which I can jump back to after I've done some exploring rather than having the run the whole thing again from the beginning?

6
  • question is not explanatory please elaborate it more for clear understanding and post some code also.and you are not using breakpoints for this? Commented Oct 25, 2016 at 12:48
  • I really don't think posting the code will help, this is a question about debugging in general. A breakpoint will stop the execution of the code, but if I then carry on stepping forward values of variables will be changed and if I go back to the breakpoint they will not have the same values as they did initially. I was asking whether you could create a point that you can jump back to that has all the same variable values as when it was created. Commented Oct 25, 2016 at 12:53
  • Really there is no way of doing this.Is there any problem with data issue which is throwing error and you need to find on which instance this is happening? Commented Oct 25, 2016 at 12:58
  • 1
    Would historical debugging help? msdn.microsoft.com/en-us/library/mt228143.aspx Commented Oct 26, 2016 at 11:31
  • @RogerLipscombe that sounds like exactly the thing I want, unfortunately I don't have Visual Studio Enterprise edition :( Commented Oct 26, 2016 at 13:26

2 Answers 2

1

I found this and just wanted to point out that Roger Lipscombe's comment is what I was also looking for: Precisely: IntelliTrace https://learn.microsoft.com/en-us/visualstudio/debugger/intellitrace?view=vs-2022

and

Historical Debugging (which is part of IntelliTrace) https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/debugger/historical-debugging?view=vs-2015&redirectedfrom=MSDN

Only available on the enterprise version of Visual Studio

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

Comments

0

I have a workaround for this kind of issue: Using the Data Breakpoint, at least, it could output and save the value manually, and it also can help you check that what value was applied to your code line, I just get this idea from this case I met before:

Visual Studio. Debug. How to save to a file all the values a variable has had during the duration of a run?

If IntelliTrace tool is helpful for you like Roger Lipscombe's suggestion, one idea is that you could use IntelliTrace Standalone Collector tool without the VS in one machine:

https://msdn.microsoft.com/en-us/library/hh398365.aspx

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.