Skip to content

Integrated Console and Transcript shows extra stuff #1265

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

Closed
dbaduck opened this issue Apr 11, 2018 · 6 comments
Closed

Integrated Console and Transcript shows extra stuff #1265

dbaduck opened this issue Apr 11, 2018 · 6 comments
Labels
Area-Extension Terminal Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.

Comments

@dbaduck
Copy link

dbaduck commented Apr 11, 2018

System Details

  • Operating system name and version: Windows 10 (10.0.16299.251)
  • VS Code version:
    Version 1.22.1
    Commit 950b8b0d37a9b7061b6f0d291837ccc4015f5ecd
    Date 2018-04-06T02:26:57.615Z
    Shell 1.7.12
    Renderer 58.0.3029.110
    Node 7.9.0
    Architecture x64
  • PowerShell extension version:
  • Output from $PSVersionTable:
    Name Value

PSVersion 5.1.16299.251
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.251
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

code -v
PS C:\Users> code -v
1.22.1
950b8b0d37a9b7061b6f0d291837ccc4015f5ecd
x64
$pseditor.EditorServicesVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
1      6      0      0

code --list-extensions --show-versions
[email protected]

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.251
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.251
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I am experiencing a problem with transcripts in Integrated Console. When I use the Integrated Console with Transcript, I get messages like the ones below. This content throughout my transcript makes it very hard to distribute a transcript. When I use a second terminal PowerShell window it does not exhibit these problems, only the Integrated ones. I demo this a lot and I would still like to use Code.

Transcript started, output file is .\documents\mytranscript_new.txt
PS>@{ 'computerName' = if ([Environment]::MachineName) {[Environment]::MachineName}  else {'localhost'}; 'processId' = $PID; 'instanceId' = $host.InstanceId }

Name                           Value
----                           -----
processId                      1312
computerName                   MACHINE
instanceId                     aa0eeae3-3de6-4361-b907-fecca790f081

PS C:\Demos\SmoStudy> @{ 'computerName' = $env:ComputerName; 'processId' = $PID; 'instanceId' = $host.InstanceId }

Name                           Value
----                           -----
processId                      1048
computerName                   SQLDEMO1
instanceId                     7948c207-c74a-46db-8ccb-93823065b319


PS C:\Demos\SmoStudy> CommandInvocation(Get-History): "Get-History"

  Id CommandLine
  -- -----------
   1 start-transcript -Path c:\demos\precon_madison.txt
   2 get-command -module sqlserver
   3 $env:psmodulepath -split ';'

I can generate logs if needed.

Attached Logs

Follow the instructions in the README
about capturing and sending logs.

@TylerLeonhardt
Copy link
Member

Spoke to @SeeminglyScience about this. He tried to fix this with PowerShell/PowerShellEditorServices#553 but it had some nasty side-effects with PS v4.

Basically the ScriptDebugger.ProcessCommand method doesn't have an option to omit the command from history.

This is quite a difficult problem to solve - not having messages show up in history.

Thanks for filing this @dbaduck! We'll investigate further.

@dbaduck
Copy link
Author

dbaduck commented Jul 23, 2019

Any updates on this one? It is still there and it makes it hard to use Code and Azure Data Studio as demo places for PowerShell. Transcripts are key for learning and remembering after the time is done.

@JustinGrote
Copy link
Collaborator

Related to #873

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 22, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Apr 23, 2020
@TheOnlyWei
Copy link

TheOnlyWei commented Mar 30, 2022

I have the same issue. Wasted a few hours debugging this futilely, then realized might be an issue with VS Code extension itself. Should be fixed just due to the fact that this issue is difficult to debug if you don't know where the logs are coming from.

The workaround to see your actual Start-Transcript output without VS Code extension clutter is obviously just to call the script you want to execute without running the script through the VS Code debugger.

@andyleejordan andyleejordan moved this to Todo in Sea Biscuit Mar 31, 2022
@andyleejordan andyleejordan moved this from Todo to In Progress in Sea Biscuit Apr 4, 2022
@andyleejordan
Copy link
Member

andyleejordan commented Apr 12, 2022

@TheOnlyWei @dbaduck Hi there, we just released v2022.4.0-preview! Could you please try PowerShell Preview for VS Code and verify this is fixed? It seemed to be in my testing, so marking as resolved, but please let me know if it's still occurs (or if new bugs show up)! Saw your comment on the other issue. It's better but not totally resolved.

@ghost
Copy link

ghost commented Apr 13, 2022

This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.

Repository owner moved this from In Progress to Done in Sea Biscuit Apr 13, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extension Terminal Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants