12

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?

bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
  • 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 Answers1

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.

Tim
  • 5,435
  • 7
  • 42
  • 62
IFink
  • 724
  • 16
  • 28