The C# "interactive window" is more fully featured than the "immediate window". Is it possible to load the debug context into it during a debug session?
Asked
Active
Viewed 2,736 times
12
-
typo? than the **interactive** window – Lei Yang May 18 '17 at 06:39
-
:) Yes. That is correct. Thanks – bradgonesurfing May 18 '17 at 06:41
-
the [other way round](http://stackoverflow.com/questions/37978166/visual-studio-2015-interactive-window), and here [maybe relevant](http://stackoverflow.com/a/11135855/1132334) – Cee McSharpface May 18 '17 at 06:49
-
At a rough guess this will allow you to launch code from the interactive window but when you hit a breakpoint you will only have the context available from the immediate window. Not quite what I am looking for though still interesting – bradgonesurfing May 18 '17 at 06:52
-
The REPL feature is completely divorced from the debugger interface. In fact you can't even debug REPL code. So what you are asking for is simply not possible. – Hans Passant May 18 '17 at 08:59
-
http://stackoverflow.com/questions/7898123/getting-debugger-context-in-c-sharp-interactive – bradgonesurfing May 18 '17 at 09:32
1 Answers
0
Quoted from this answer: https://stackoverflow.com/a/43106951/1806239
After you've run Initialize Interactive with Project, you can use Debug > Attach to Process to connect to the InteractiveHost.exe process.
You can then debug functions from your project.
Works for me in VS2019.