Skip to content
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

VS Code not reading jsconfig.json #13597

Closed
malte-timmermann opened this issue Oct 12, 2016 · 5 comments
Closed

VS Code not reading jsconfig.json #13597

malte-timmermann opened this issue Oct 12, 2016 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@malte-timmermann
Copy link

malte-timmermann commented Oct 12, 2016

I also have the issue the jsconfig.json is not being read (see old/closed issue #703)

Tested with Visual Studio Code v1.5.3 and v1.7.0 insider, on Windows x64 (version 1607). No 3rd party antivirus, just Windows defender.

When using Sysinternals process monitor, I see that VS Code is getting some information about jsconfig.json (QueryAllInformationFile), but does NOT read the file (ReadFile).

Log when opening VS Code (with the current project) (reduced to jsconfig.json and my test file)

http://pastebin.com/GTKHPCZC

Log when actually opening jsconfig.json inside VS Code (so something like that should also happen when launching VS Code):

http://pastebin.com/je8Y3p4C

Not reading jsconfig.json unfortunately means that "go to definition" doesn't work for me with my own js files, what hinders me from switching from Netbeans to VS Code :(

I would really appreciate if this issue could be fixed. If you need further information, or my stripped down example, just let me know!

@malte-timmermann
Copy link
Author

malte-timmermann commented Oct 12, 2016

vscode-test-prj-root.zip

In case it helps, here is my stripped down example.

It has a complex folder hierarchy because it's part of a larger project. I tried using open folders with prj-root as well as with prj-root\ui\apps\com.mydomain\mycomponent for testing purpose, that's why there are two jsconfig.json files.

Problem 1:
When editing prj-root\ui\apps\com.mydomain\mycomponent\baseframework\app\baseapplication.js, it's not possible to go to the definition of Utils.doSomething()
Possible root cause: jsconfig.json not used

Problem 2:
Quick-Open (Ctrl+P) utils.js only ignores the copies in "node_modules" (default), but not in "ignore" (configured as exclude in jsconfig.json)
Possible root cause: jsconfig.json not used

@waderyan
Copy link

@malte-timmermann thank you for opening this issue.

@bowdenk7 can I get your eyes on this one? OP seems to have set everything up correctly (see his zip file). If I try to trigger IntelliSense in node_modules/utils.js I get nothing.

image

@waderyan waderyan added javascript JavaScript support issues info-needed Issue requires more information from poster labels Oct 14, 2016
@bowdenk7
Copy link

Hey @malte-timmermann, unfortunately we are unable to resolve AMD modules at the moment. To resolve this, you would need to update your codebase to use either ES6 modules or commonjs modules.

The other issue with this specific code sample is that we can't resolve the expando pattern either. For example:

var Utils = {};
Utils.foo = function(bar) {return bar};

Utils.    //<------ we don't know function foo exists

To resolve this one, you would just need to declare object properties at declaration time as opposed to tacking them on later. Like this:

var Utils = {
    foo: function(bar) {return bar};
}

Like Wade said, we really appreciate you taking the time to open this issue. It helps us a lot. If you are interested in chatting more or trying to convert some of your code, I would be happy to help.

@malte-timmermann
Copy link
Author

Hi bowdenk7,

thanks for looking into this.

Too bad that VS Code wont support this, as this works fine in Netbeans, and changing code is not an option.

Given that ES6 is currently not used by most people developing web apps - really no chance to support it?

At least you wrote "at the moment" - so there is hope?

Best regards
Malte.

@mjbvz mjbvz self-assigned this Jan 9, 2017
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jan 13, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Jan 13, 2017

Amd module support is being tracked here: microsoft/TypeScript#6942

I believe the properties issues is now being tracked here: microsoft/TypeScript#7632

Closing as upstream

@mjbvz mjbvz closed this as completed Jan 13, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants