1

When I'm writing JavaScript using IDEs like VSCode or WebStorm, I feel it's not as intelligent on code completion as Eclipse.

For example when I write Java using Eclipse. It's intelligent code completion feature will tell me where it will have error, without run it (possible it runs at background, but I don't need to press the run button).

But in some similar cases in VSCode or WebStorm, it does not show me the error. I need to press the run button, run it by hand, and get an error.

Like the following JavaScript code, the last one will be error after run it, but VSCode does not tell. But similar cases in Java in Eclipse will show error right away.

Also, after I type the last "." VSCode's code completion still shows the "__proto__". But similar cases in Eclipse, if the code will be error, after I type the ".", its code completion feature will not show that thing.

           function MyClass(){

           };
           var mc = new MyClass();
           console.log(mc);
           console.log(mc.__proto__);
           console.log(mc.__proto__.__proto__);
           console.log(mc.__proto__.__proto__.__proto__); //null
           console.log(mc.__proto__.__proto__.__proto__.__proto__); //Will get error

How to make VSCode or WebStorm to show error right away?
How to make these to not show that thing that will cause error after I type "."?
If VSCode or WebStorm can not do these, are there any IDEs can do this?

3
  • Why don't you try Eclipse for Web Developers? Commented Sep 2, 2019 at 1:45
  • @EddeAlmeida I have tried, but I remember my version of Eclipse does not have built in html editors. It appears I need to install some plugins, but my network is very slow connecting Eclipse servers... Commented Sep 2, 2019 at 1:50
  • 1
    There is a version of Eclipse with all you need to Web Development, including HTML editor. Commented Sep 2, 2019 at 4:20

1 Answer 1

4

Comparing the experience in an IDE for Java (a type-safe language) and JavaScript (a dynamic-type language) may not be a fair comparison. However, there are some things you can do to make it better.

For example in VS Code, the documentation suggests the following:

While IntelliSense should just work for most JavaScript projects without any configuration, you can make IntelliSense even more useful with JSDoc or by configuring a jsconfig.json project.

Further, your specific example will not be helped by more configuration as every object in JavaScript contains the __proto__ property. See MDN.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.