-
Notifications
You must be signed in to change notification settings - Fork 498
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
Error message "is a file type that cannot be debugged by the powershell debug" with capital file extension .PS1 #641
Comments
Add comments to commit: 47b4c5f |
Thanks Wei! We'll get that fixed. |
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
* Fix detection of valid PS ext for debugging. 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 * Fix issue with debugging unsaved file. * Use same term used in the command palette. * Shorten error message based on juneb feedback.
@rkeithhill Hey, I was having this issue with lowercase .ps1 and changed it to .PS1 and it works. VSCODE 1.12.2 |
@DrYSG You're still having this issue with PowerShell extension 1.0? |
So you have 1.0.0 of this extension installed into VSCode? The original bug was the opposite of what you are reporting. PS1 did not work while ps1 did work. Can you provide some repro steps? Thanks. |
Yes, that is the funny thing. I am reporting the opposite. PS1 works and ps1 does not. Steps
Is there a newer version for the launch.json that 0.2.0 (I know I am using 2.0.0 for the tasks.json).?
|
The version of launch.json should be |
If I start by opening a folder with with a I looked through the commits tied to this, and the extension handling looks correct (not using locale, but I dont think that matters), so there is probably something wrong with the Is there a way to dump out the current documents language id property without setting up a debug session? |
@StingyJack Are you on the latest VSCode release? Also, what OS are you using? VSCode should indicate the document's language in the lower right part of the status bar. In looking at this I noticed the following in the VSCode docs:
We've had this warning in our package.json file for a long time: But that is just the package name so I guess the warning doesn't matter? This is where we activate based on the language:
In looking at the list of VSCode langauge identifiers, they have misspelled |
This is hard for me to debug since I can't repro it. BTW I debug workspaces with Also, this doesn't quite parse for me:
You say you rename the file from a |
it should say If I start by opening a folder with with a powershell script ending in Its the uppercasing of the extension that fixes it for the file, for the session. This is more or less fresh install, as I don't use VSC often at all. I update it whenever it asks. |
Thanks for clarifying. That is pretty weird though. Hmm.... |
System Details
$PSVersionTable
:Name Value
PSVersion 5.1.14393.953
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.953
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
code -v
1.10.2
8076a19fdcab7e1fc1707952d652f0bb6c6db331
PS D:> $pseditor.EditorServicesVersion
PS D:> code --list-extensions --show-versions
Adrien.VisualStudioDarkTheme@1.0.1
alefragnani.Bookmarks@0.12.0
emilast.LogFileHighlighter@1.1.1
emmanuelbeziat.vscode-great-icons@1.1.47
IBM.output-colorizer@0.1.0
ms-vscode.cpptools@0.10.5
ms-vscode.PowerShell@0.11.0
ms-vscode.wordcount@0.1.0
msazurermtools.azurerm-vscode-tools@0.3.4
robertohuertasm.vscode-icons@7.4.0
slevesque.vscode-hexdump@1.2.1
PS D:> $PSVersionTable
Name Value
PSVersion 5.1.14393.953
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.953
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When the file extension is capital, it reports error like:
"is a file type that cannot be debugged by the powershell debug"
Attached Logs
Follow the instructions in the README
about capturing and sending logs.
The text was updated successfully, but these errors were encountered: