question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntelliSense in debug mode is behaving strange

See original GitHub issue

System Details

  • Operating system name and version: Windows Server 2012 64 bit
  • VS Code version: 1.15.0-insider
  • PowerShell extension version: 1.4.1
  • Output from $PSVersionTable: Name Value

PSVersion 4.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.42000 BuildVersion 6.3.9600.16406 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0} PSRemotingProtocolVersion 2.2

Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

code -v
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the pa
th is correct and try again.
At line:1 char:1
+ code -v
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS S:\Prod> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      4      1      0


PS S:\Prod> code --list-extensions --show-versions
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the pa
th is correct and try again.
At line:1 char:1
+ code --list-extensions --show-versions
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Issue Description

When putting a breakpoint in the editor and running the code, the code execution is correctly stopped at the breakpoint. However, when we then open the terminal to try out some code in that session, IntelliSense is acting a bit weird. It’s not suggesting CmdLets or functions but rather selecting them immediately without showing the suggestion first.

Ecample code with a breakpoint at line 7:

[CmdLetBinding()]
Param (
    [String]$MyParam
)

Write-Verbose "Script started"
Write-Verbose "$MyParam"
Get-Process | Select-Object Name
Write-Verbose "Debugging done"

When the execution stops at line 6, you can type in the Terminal for example get-he, then use a TAB to complete the CmdLet to Get-Help but it’s not just completing the CmdLet but also executing it at the same time. This makes it hard to see what CmdLets are available and if we really want to execute that specific one…

If you instead type Get-he and do a TAB you get different behavior, the Terminal then executes something that has nothing to do with the Get-Help CmdLet.

I’m using here Get-Help as an example, but this problem is for all CmdLets in the session. This is a very annoying issue as it hinders development.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
rkeithhillcommented, Jul 14, 2017

FYI @daviwil is doing that work and it can’t come soon enough IMO. 😃

https://www.youtube.com/watch?v=39S3dLDEbYs

0reactions
daviwilcommented, Aug 14, 2017

Closing this issue since it will be resolved with the inclusion of PSReadLine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio is acting weird. How do I fix this? - Stack Overflow
First: Restart Visual Studio and, if that fails, restart your computer. The majority of small issues are fixed by restarting Visual Studio. ·...
Read more >
Intellisense squiggles appear even though headers are ...
So if you're getting squiggles on the headers it means IntelliSense isn't able to find the files via the includePath used. Can you...
Read more >
Visual Studio IntelliSense Not Working? What To Do.
Workaround #1: Restart Visual Studio​​ But it's surprising (or maybe not) the number of times restarting Visual Studio manages to make it stop...
Read more >
Xamarin forms application deployed on android showing ...
Out of no where my application deployed on android device/emulator showing unusual behavior such as elements disappearing and layouts like stack ...
Read more >
Fixing Visual Studio Intellisense Errors - Rick Strahl's Web Log
suo file. Deleting the .vs folder in newer version nukes the .suo file which is responsible for cached IntelliSense and also some cached...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found