Interactive console does not provide command history in debugger
System Details
- Operating system name and version: Windows 7 (64-Bit)
- VS Code version: 1.10.2
- PowerShell extension version: 0.10.0
- Output from
$PSVersionTable:
Name Value
---- -----
PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When executing commands in the integrated terminal, the up and down arrows on the keyboard to browse through command history do not work.
For example:
- Execute a command such as Get-Item
- When the command is finished, I would expect to be able to press the up arrow on the keyboard and have
Get-Itemre-appear as the command to run. Instead, the command input remains blank.
Are you typing in the command or using F8 to execute it? What is the output of the Get-History command? History should be working for you.
Sorry missed some information. This is only an issue while debugging when a breakpoint is hit and commands are being manually entered via the terminal.
Thanks! I'll check on that.
Definitely a bug here. I'll fix it when I overhaul command history in a few days.
This is a pain, typing the commands again and again on the interactive console while debugging. Hoping this gets fixed soon.
Any update on the issue? As I'm sure everyone agrees this is a pain when debugging.
I've been trying to use VSCode for my day-to-day PowerShell needs, but this issue really hinders how fast I can be when debugging code.
same here, trying to switch to vscode, but this makes it very painful. I use this ALL THE TIME, when debugging scripts!
Me too - loving vscode but the ability to use the interactive console whilst debugging at a breakpoint is massively hindered because of this bug :( It's the only thing really stopping me from jumping full swing into vscode.
Yes, I thought I would be able to say bye to ISE, but this is really a showstopper!
@daviwil What's the status on this issue? Is this being blocked by a bigger issue and the team is still debating how to approach it or is it just a question of finding time?
Basically does it make sense for me to spend some time and see about implementing this feature currently?
@SeeminglyScience has a fix for this, we just need to do a bit of verification work before merging it.
Oh I didn't realize that the commit was the entire fix, nice.
I'm assuming there's not really any good way in which someone with no experience with the code can help with the verification work necessary? Would really love to see this issue fixed sooner than later, so if there's a way to help please tell.
Same here: if there's a way to get a build with that fix in, I'd be delighted to test that!
Me, three. If I can help accelerate a fix, please let me know how I can help. I've worn the paint off my up-arrow key sitting there stupidly hitting it over and over and over again to no avail.
I am in the same boat, I'm looking at switching to VSCode from ISE. (for the GIT integration)
This thread made it sound like there was a fix, but unless I am missing something it does not appear it's made it's way to VSCode yet.
@moymike yeah it hasn't made it to release yet. The fix is adding support for PSReadLine which is mostly done, but it's a huge change. Sorry for the delay, been getting side tracked with other projects.
@SeeminglyScience Thanks for the update. I sympathize with "huge changes". :-)
Any chance the fix to PSReadLine will contain support for $host.PrivateData, which is blank in VSCode.
($host.PrivateData allows control of text color for warnings, verbose, debug, etc)
@moymike Nah that's unrelated. Looks like a quick fix though. I'll take a crack at it this weekend.