REPL for C# in VS that lets you run methods that are defined in the app you are currently debugging
Does anyone know of a REPL for C# that allows you to run methods (which are defined in your app) in the context of the app that you are currently debugging (via F5) ?
Does anyone know of a REPL for C# that allows you to arbitrary code in the context of the app that you are currently debugging (via F5) so that this code would have access to all of the values for the variables in my running app?
Example:
Step 1) Hit F5 to debug my app.
Step 2) Use a REPL to run the myMethod() method which is defined in my already running app.
Alternate Step 2) Use a REPL to run arbitrary code in the context of my already running app so that this code would have access to all of the values for the variables in my running app.
I am specifically asking about VS but am also interested in the answer for VS Code and Rider too. I am also open to using an Extension to accomplish this.
My app is a desktop WPF (and WinForms) app.
I am aware of the Command Window, the Immediate Window, and the C# Interactive Window but none of these seem to let me do what I want.
What I am asking for can be done when using Common Lisp environments, when using the MIT Scheme compiler, SmallTalk environments, and even for JavaScript running in web browsers. So I know that some languages/compilers support this (because I have used them) but I can't seem to figure out how to get it to work in VS. In these other environments this would be considered interacting with a live image of the application, but the closest thing to this that I have found in VS is "Edit and Continue" which is very limited.
Any help is greatly appreciated, thank you.
Does anyone know of a REPL for C# that allows you to arbitrary code in the context of the app that you are currently debugging (via F5) so that this code would have access to all of the values for the variables in my running app?
Example:
Step 1) Hit F5 to debug my app.
Step 2) Use a REPL to run the myMethod() method which is defined in my already running app.
Alternate Step 2) Use a REPL to run arbitrary code in the context of my already running app so that this code would have access to all of the values for the variables in my running app.
I am specifically asking about VS but am also interested in the answer for VS Code and Rider too. I am also open to using an Extension to accomplish this.
My app is a desktop WPF (and WinForms) app.
I am aware of the Command Window, the Immediate Window, and the C# Interactive Window but none of these seem to let me do what I want.
What I am asking for can be done when using Common Lisp environments, when using the MIT Scheme compiler, SmallTalk environments, and even for JavaScript running in web browsers. So I know that some languages/compilers support this (because I have used them) but I can't seem to figure out how to get it to work in VS. In these other environments this would be considered interacting with a live image of the application, but the closest thing to this that I have found in VS is "Edit and Continue" which is very limited.
Any help is greatly appreciated, thank you.
