2

I use Visual Studio Code to debug PowerShell scripts that call into a module.

However, I find that after making a change to the module, when I restart debugging and step into the module, the debugger has not picked up the changes I made to the module (I see the changes, but it looks like the debugger is still referencing the old module, because the step-over steps are in different places from where they should be). The only way to fix this now is to shut down Visual Studio Code and restart.

Is there any way I can get the debugger to pick up the changes to the module without having to restart Visual Studio Code?

Tola Odejayi
  • 3,019
  • 9
  • 31
  • 46
  • have you tried [Under Projects and solution -> Build and Run select "Always build" under "On Run, when projects are out of date"](https://stackoverflow.com/questions/23063985/visual-studio-2013-changes-not-showing-in-debug) ? – jrider Sep 24 '18 at 21:19
  • **Always** launch a new temporary console when debugging modules. Also, use the `-Force` switch on `Import-Module` to re-import the module members. – Maximilian Burszley Sep 24 '18 at 22:51

0 Answers0