Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First execution of PowerShell script changes context into debugger #11643

Closed
pcgeek86 opened this issue Sep 7, 2016 · 2 comments
Closed

First execution of PowerShell script changes context into debugger #11643

pcgeek86 opened this issue Sep 7, 2016 · 2 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@pcgeek86
Copy link

pcgeek86 commented Sep 7, 2016

IMPORTANT: I'm filing this more broadly on Visual Studio Code, at the request of @daviwil, after initially filing it on the PowerShell extension for VSCode.

System Details

  • Operating system name and version:
  • VS Code version: 1.4.0
  • PowerShell extension version: 0.7.2
  • Output from $PSVersionTable:
PS C:\Users\TrevorSullivan> $PSVersionTable

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 you open VSCode and run a PowerShell script, for the first time in the new session, the PowerShell Extension switches VSCode from the Explorer context, into the Debugging context. Subsequent executions do not do this.

Reproduction Steps

  • Open VSCode
  • Open a project with a PowerShell script (in my case, a Pester test script)
  • Hit F5 to run the script
  • NOTICE: VSCode changes into debugging context, and script runs/exits
  • Go back to Explorer context in VSCode (CTRL + SHIFT + E)
  • Hit F5 to run the script again
  • NOTICE: VSCode doesn't change into the debugger context

Originally filed here: PowerShell/vscode-powershell#283

Cheers,
Trevor Sullivan
Docker Captain
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86

@ramya-rao-a ramya-rao-a added the debug Debug viewlet, configurations, breakpoints, adapter issues label Sep 8, 2016
@isidorn
Copy link
Contributor

isidorn commented Sep 8, 2016

What does change into the debugger context mean?
If you mean opens debug console then this is as designed as you can configure the internalConsoleOptions in your launch.json.
More details can be found here #4045

If that is not the case, please let me know and I will reopen this issue - thanks!

@isidorn isidorn closed this as completed Sep 8, 2016
@pcgeek86
Copy link
Author

pcgeek86 commented Sep 8, 2016

@isidorn It opens the Debugger pane on the Sidebar, which isn't necessarily desirable. Also, the behavior is inconsistent, because it does it the first time, but doesn't do it after that.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

4 participants