PowerShell / PowerShell/PowerShell
Set-PSDebug -Trace 1 prints only first line of a multiline command
Open
Nobody has claimed this yet.
Hacktoberfest
In-PR
Up-for-Grabs
WG-Interactive-Debugging
- Dominant language
- C#
- Stars
- 55.5k
- Forks
- 8.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 88
Description
Steps to reproduce
Set-PSDebug -Trace 1
Write-Output "foo `
bar"
Expected behavior
Something like:
DEBUG: 3+ >>>> Write-Output "foo `
DEBUG: 4+ >>>> bar"
foo
bar
Actual behavior
DEBUG: 3+ >>>> Write-Output "foo `
foo
bar
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.2.0-preview.1
PSEdition Core
GitCommitId 6.2.0-preview.1
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with Set-PSDebug -Trace 1 and the multiline Write-Output command shown in the report, then locate the implementation that formats trace output. Done means the debug trace includes both lines of the multiline command while preserving the reported output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100