You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alexdima opened this issue
Aug 30, 2016
· 5 comments
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
functionPerson(name,age){this.name=name;this.age=age;}Person.prototype.greet=function(whom){console.log('Hello '+whom.name+', my name is '+this.name);// <---- BREAKPOINT HERE}Student.prototype=Object.create(Person.prototype);functionStudent(name,age,school){Person.call(this,name,age);this.school=school;}Student.prototype.getSchool=function(){returnthis.school;}vara=newPerson('John',20);varb=newStudent('Charlie',20,'UNI');a.greet(b);
When typing 'hello'. or 5. I would expect to get functions and properties available on the constants I defined. I use this a lot in Chromium to find a method and try it out quickly. At the moment, I get global suggestions such as Buffer or console which results in an invalid expression error.
The text was updated successfully, but these errors were encountered:
This works, but I'm not sure whether it should work in the 5. case. It will prompt you to complete it like 5.toString() but this is not valid syntax. And it works because the debug adapter wraps the input before the dot in (). Feels wrong to me. It doesn't work in Chrome. Any other thoughts?
I agree with @roblourens. Showing proposals for number constants does not makes sense. Also 5.toString() is not a valid syntax and doing this will give an error. Hence we should not show.
@sandy081 yes, please create a new issue (but I do not intend to fix that behaviour).
The proposals are valid for the type 'number' and they are still helpful for @alexandrudima use case.
Since I do not have a JavaScript parser/scanner available, I do not want to start validating JavaScript expression. There is an infinite number of incorrect expressions where we still return IntelliSense.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
Testing #10997
When typing
'hello'.
or5.
I would expect to get functions and properties available on the constants I defined. I use this a lot in Chromium to find a method and try it out quickly. At the moment, I get global suggestions such asBuffer
orconsole
which results in an invalid expression error.The text was updated successfully, but these errors were encountered: