Configure launch.json for VSCode to execute PowerShell commands in the debug session

Viewed 1275

Is it possible to create an entry in the launch.json, which executes a PowerShell script or scriptblock, in the same runspace as the to-be-launched and debugged script?

The reason is, I would like to reset the runspace (remove variables + background jobs, unload modules etc.) before debugging a script. The "temporary integrated console" which was created for that purpose, unfortunately has an unfixed bug for over a year now, which prevents interactive debugging in the temporary console and therefore makes it useless to me.

0 Answers
Related