PowerShell / vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items/ms-vscode.PowerShell
MIT License
1.69k stars 481 forks source link

Document how to debug scripts in PowerShell x86 with the new model #289

Open rkeithhill opened 8 years ago

rkeithhill commented 8 years ago

System Details

Name                           Value
----                           -----
PSVersion                      5.1.14393.103
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.103
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

When I open a new folder/workspace, go to the Debug window and select a debug profile only PowerShell shows up. PowerShell x86 used to show up as well, allowing me to debug scripts that used modules that only run in x86 PowerShell. I can no longer debug these scripts.

Attached Logs

N/A

daviwil commented 8 years ago

Yeah, now you have to set the x86 mode setting for Editor Services because the language and debug server are running in the same process. I did a bad job of transitioning and communicating that, will add some documentation about it.

rkeithhill commented 8 years ago

Hmm, if we had launch outside the debugger then attach to process, then we'd be set. :-)

The way it is now is more or less how ISE works. Except that I can pick the ISE I want to start (x86/x64). With VSCode I have to tweak a user setting and reload VSCode. And tweak and reload to switch back to x64. Not the end of world but not ideal either.

daviwil commented 8 years ago

Yeah, definitely not ideal. I suppose it would be nice to easily switch to a different bitness for debugging purposes but that will complicate things with the new design. Not totally out of reach though, I think we might be able to accomplish this with a separate PowerShell session. Once I get the new integrated terminal approach going it'll be worth looking into this again.

daviwil commented 8 years ago

Filed a separate issue to track that: #290

daviwil commented 7 years ago

This situation will improve in 0.8.0 now that it will be much easier to temporarily switch to an x86 session without fiddling with the settings file. We'll still need an option to force the debugger to use an independent x86 session though, so I'll put this issue back on the backlog for now.

daviwil commented 7 years ago

Oh, this issue was for documentation. I'll definitely add that for 0.8.0 since there's a solution for this.