fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Visual Studio Debug options: Edit and Continue and Step Back

Visual Studio Debug options: Edit and Continue and Step Back 1 week 2 days ago #11605

  ic2's Avatar Topic Author ic2 Offline Posts: 573
I thought I asked this earlier but couldn't find it back, also not in the NG's. This is what I found, is this correct:

Visual Studio Edit and Continue

Theory: This needs to be enabled in Options/Debugging, General first. It should allow you to change a line of code and continue with that line of code.
What I see: I can indeed make a change during debugging, then select Continue or Step Into from the debug menu, but VS warns me that I am debugging different code than is currently displayed - and doesn't do anything with the changes.

Visual Studio Step Back

Theory: During debugging it is possible to select Set Next Statement from the right mouse menu, also when this is earlier in the code
What I see: I can indeed make the program continue in an earlier line of code, but the variables are not changed back to the state they were at that line so the rerun may have limited value.
I suspect that when using the VS Enterprise Version and you set up Debug/Intellitrace, that it also restores the state of variables.

Am I right in the above statements?

Dick

Please Log in or Create an account to join the conversation.

Visual Studio Debug options: Edit and Continue and Step Back 1 week 2 days ago #11606

  Chris's Avatar Chris Offline Posts: 1459
Hi Dick,

About the Step Back (or even forward) which is available also in XIDE, yes, it does not bring back the whole state in time, it only allows you to run again a specific part of code, with the current set of values. Or you can avoid executing a line or more, but jump to a place later in the code. Of course you can also manually modify the value of the variables (at least many of them) before executing the code again.

Not sure about Edit and Continue, will let Robert answer that.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Visual Studio Debug options: Edit and Continue and Step Back 1 week 1 day ago #11610

  robert's Avatar robert Offline Posts: 1309
Dick,
Edit and Continue requires 2 things:
1) that the editor buffer is Read/Write when running the debugger (this is controlled with the Options/Debugging flag)
2) that the VS support for a language runs the compiler and 'patches' the generated IL with the changed code.

We do not support 2) at this moment. We have looked at it and it is not trivial...

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

  • Page:
  • 1