-
Notifications
You must be signed in to change notification settings - Fork 511
Fix detection of valid PS ext for debugging. #642
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
Conversation
Was previously only allowing lower case ps1 and psm1. I'm assuming that on *nix file systems, that PowerShell allows all variations of ps1,PS1,pS1,Ps1 as valid script extensions. Fix #641
@rkeithhill have you updated your PSES? I did the debug adapter work already to enable this. If it's not working after updating that I may need to take a look. Has been working fine for me though. |
Setting the |
Actually, approved too soon. I think we need to ensure the language mode is still |
Yeah I was wondering about that. You made that change to VSCode but I figured that wouldn't be released for a while. So the assumption was that this worked without having to set the language mode. So, let me check my understanding. You can debug an unsaved file but for now you have to set the language mode to PowerShell. Is that right? If that is the case, we can put up a message to tell the user to set the language mode to PowerShell for an unsaved doc. |
Hmm... Yeah, good point. I suppose if they've already selected the PowerShell debug configuration for Current File and they're hitting F5 on an untitled file that isn't marked Yeah, you won't be able to set breakpoints at this time with the untitled script, just stepping through. |
Might be good to get @juneb's input on the error message string, she's been fixing up a lot of my bad verbiage :) |
Thanks, @daviwil! Change is much better than set, which is ambiguous, even to native English speakers. To shorten that error message, change "In order to" to "To". To debug '', change the document language mode to PowerShell or save the file with a PowerShell extension. |
OK, updated to: |
Looks good, thanks June! |
This change enables untitled files to be debugged when they are set to the 'powershell' language mode. Fixes #555.
Was previously only allowing lower case ps1 and psm1. I'm assuming that on *nix file systems, that PowerShell allows all variations of ps1,PS1,pS1,Ps1 as valid script extensions.
Fix #641
@daviwil Currently, debugging an "untitled" script file doesn't work even if you set the language to PowerShell. That's because this code below detects "isUntitled" and sets the
script
property tountitled:Untitled-1
. Seems like you were working on enabling debug of untitled/unsaved script files. Is that coming later or should the below be working now?