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
Set-PSDebug -Trace 1 prints only first line of a multiline command #8113
Comments
@the-ress Can you repo without PSReadline loaded? |
It repros without PSReadLine. Seems like it should be outputting the logical line and not the physical line |
The problem is here. Basically it only traces the line at the start of the extent. |
I'd be interested in picking this issue up if it's still available. Based on @SteveL-MSFT 's previous comment, it looks like the |
@dwalleck yes, seems correct. Consider it yours! |
It will take some smarts to provide a better experience. Most statements have multiple lines, e.g. an
|
Based on @lzybkr's feedback on the PR, it seems that we should conclude on what we think is the optimal expected output for multiline. I would also suggest that it should be enabled via a parameter on |
I should point that the original repo sample is about multiline with backtick. |
The actual code I was debugging looked like this: (Note the extra backtick on line 3.) msbuild /m /restore MyApp.sln `
/p:Configuration="$Configuration" `
/p:Platform="$Platform" `
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } Seeing only the first line of the command wasn't really helpful. |
@iSazonov thanks for pointing that out! We should focus on when a single logical line is multiple physical lines and not the general multi line case |
We should be able to simply check if the line referenced ends with a backtick, and if it does, grab the next line as well, loop until we find a line that doesn't end in a backtick. |
This is still an issue to this day... PowerShell 7.1.0 |
And to this day @7.3.0 |
Any news? How I can see the multi line commands? @7.3.4 |
Still an issue in 7.4.0 |
Steps to reproduce
Expected behavior
Something like:
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: