Skip to content

Intellisense doesn't always work for powershell #279

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

Closed
4c74356b41 opened this issue Aug 26, 2016 · 17 comments
Closed

Intellisense doesn't always work for powershell #279

4c74356b41 opened this issue Aug 26, 2016 · 17 comments

Comments

@4c74356b41
Copy link

Sometimes in VScode powershell code doesn't have intellisense at all. Sometimes for some commands, sometimes for all commands.

_

@rkeithhill
Copy link
Contributor

Try switching the file type from 'Plain Text' to 'PowerShell' by clicking on 'Plain Text' in the status bar. Or you can save the file with a .ps1 extension.

Keep in mind that VSCode is an editor for many different languages, not just PowerShell.

@4c74356b41
Copy link
Author

4c74356b41 commented Aug 26, 2016

Well, it seems to work this way, but it takes intellisense like 10 seconds to kick in, is this expected? I have core i5 4200, 8gb ram, 256gb ssd... Besides the fact that its super inconvenient, can I set default to PowerShell somewhere?

@rkeithhill
Copy link
Contributor

The issue with performance has been submitted and is being tracked here: PowerShell/vscode-powershell#166

can I set default to PowerShell somewhere?

Looking through VSCode settings, I don't see a setting for this. It's a good idea though. You might want to submit that to http://github.com/microsoft/vscode/issues.

@daviwil
Copy link
Contributor

daviwil commented Aug 26, 2016

@4c74356b41 it could just be taking a little bit of time for the language service to get started up. I need to add some "Loading" text in the status bar to make sure users are aware that the language service hasn't fully loaded yet.

@4c74356b41
Copy link
Author

well, it doesn't matter how long since vscode started. everytime you type a new commandlet (i mean, not the one not used before but any new commandlet) it won't show intellisense for like 5-10 seconds...

@daviwil
Copy link
Contributor

daviwil commented Aug 26, 2016

Understood. Do you mind sending some logs so I can take a look? Zip up this folder and drop the zip file into the issue comment box:

$HOME\.vscode\extensions\ms-vscode.PowerShell-0.7.1\logs

@4c74356b41
Copy link
Author

4c74356b41 commented Aug 26, 2016

ehm, sorry, but there's nothing in vscode directory... where should I look?
ah forget it, found it. or maybe not. cannot find that directory in extensions dir.

@daviwil
Copy link
Contributor

daviwil commented Aug 26, 2016

There must be if you're using the extension :) The line I gave you was meant to be run in PowerShell, you can try checking this path directly:

c:\Users\<your username>\.vscode\extensions\ms-vscode.PowerShell-0.7.1\logs

Let me know if that doesn't work for you

@4c74356b41
Copy link
Author

oh, sorry, i was looking in the application directory.
logs.zip

@4c74356b41
Copy link
Author

btw, I have another PC at my work, and I observe the same behaviour.

@4c74356b41
Copy link
Author

sorry to derail, is there an ability to launch\test\debug powershell in vscode? if so kindly point me to an article or something?

@rkeithhill
Copy link
Contributor

rkeithhill commented Aug 26, 2016

@4c74356b41
Copy link
Author

thanks.

<#
this is not recognized in vscode
in a sense that you can't collapse this.
#>

@daviwil
Copy link
Contributor

daviwil commented Aug 31, 2016

Yeah, this is a limitation in VS Code currently. All code folding is done based on indentation and without any awareness of language constructs. If you indent the lines within the comment block it will be collapsible. I'm pushing them to start making progress on this soon.

@4c74356b41
Copy link
Author

ic, any info on my logs?

@daviwil
Copy link
Contributor

daviwil commented Sep 1, 2016

Hey @4c74356b41, looks like no verbose logs are being written out. Can you add this setting in VS Code, reproduce the issue again, and send the new logs?

"powershell.developer.editorServicesLogLevel": "Verbose"

Thanks!

@4c74356b41
Copy link
Author

I think I've figured this out, sometimes PS session will crash and VSCode won't restart it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants