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

Cannot read property 'openConfigFile' of undefined #38674

Closed
IlyaBizyaev opened this issue Nov 18, 2017 · 14 comments
Closed

Cannot read property 'openConfigFile' of undefined #38674

IlyaBizyaev opened this issue Nov 18, 2017 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@IlyaBizyaev
Copy link

  • VSCode Version: Code 1.18.1 (929bacb, 2017-11-16T18:34:22.110Z)
  • OS Version: Linux x64 4.4.92-31-default
  • Extensions:
Extension Author (truncated) Version
toml be5 0.0.3
vscode-rust kal 0.4.2
Go luk 0.6.67
python ms- 0.8.0
cpptools ms- 0.14.2
java red 0.14.0
vscode-lldb vad 0.7.1
vscode-java-debug vsc 0.3.1
debug web 0.21.2

I get this error message when launching debug with any debugger.

Reproduces without extensions: no need in it without extensions.

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 18, 2017
@weinand weinand added the info-needed Issue requires more information from poster label Nov 20, 2017
@weinand
Copy link
Contributor

weinand commented Nov 20, 2017

Please provide reproducible steps for a specific debugger extension.

@IlyaBizyaev
Copy link
Author

For Rust, open any *.rs file, press Debug -> Start debug, choose any debugger. Even works if you just press "More".
Same for C++ and *.cpp files.

@weinand
Copy link
Contributor

weinand commented Nov 20, 2017

Please run VS Code without extension code --disable-extensions and then create a trivial node program hello.js:

console.log("hello world");

and start debugging by pressing F5.

Does the error still occur?

@weinand
Copy link
Contributor

weinand commented Nov 20, 2017

@isidorn does the error 'openConfigFile' of undefined ring a bell?

@IlyaBizyaev
Copy link
Author

Debugging JS seems to work with extensions enabled.

@isidorn
Copy link
Contributor

isidorn commented Nov 20, 2017

The exception probably comes from here https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/electron-browser/debugService.ts#L722

@IlyaBizyaev so I would speculate that you are doing this from the purple vscode. Is that correct?
Thought launch can be null there so I think you incovered a potential null pointer which I can push a fix for.

In case you are not doing this for the purple vscode, please Help > Developer Tools, Checkoff the break on uncaught exceptions and paste the exception with the stack trace here.

@isidorn isidorn assigned isidorn and unassigned weinand Nov 20, 2017
@weinand
Copy link
Contributor

weinand commented Nov 20, 2017

Please try to run VS Code with just one debugger extension enabled, e.g. Rust.
If this works fine, add the next extension.
I suspect that some extension is causing this.

@IlyaBizyaev
Copy link
Author

IlyaBizyaev commented Nov 20, 2017

Well.. I'm not sure what "purple" means here, the bottom toolbar is purple.
Here is the log:

workbench.main.js:sourcemap:9 Cannot read property 'openConfigFile' of undefined: TypeError: Cannot read property 'openConfigFile' of undefined
    at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:10:494997
    at Object.g [as _notify] (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:62701)
    at Object.enter (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:66048)
    at n.Class.derive._creator._run (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:67876)
    at n.Class.derive._creator._completed (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:67317)
    at Object.g [as _notify] (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:62701)
    at Object.enter (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:66048)
    at n.Class.derive._oncancel._run (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:67876)
    at n.Class.derive._oncancel._completed (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:67317)
    at e.resolveOk (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:9:2438440)
e.doShow @ workbench.main.js:sourcemap:9

@IlyaBizyaev
Copy link
Author

The problem is there for C++ with all extensions disabled.

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Nov 20, 2017
@isidorn isidorn added this to the November 2017 milestone Nov 20, 2017
@isidorn
Copy link
Contributor

isidorn commented Nov 20, 2017

@IlyaBizyaev I have pushed a fix for this such that a null pointer no longer happens. However your root cause will still be there and that is that your extensions do not seem to support no folder vscode (purple) and are thus failing to start a debug session.
You should open a folder and then start deubugging. You can also open issues in the github repositories of the extensions you are using and let them know they should support no folder workspace debugging

@ask6155
Copy link

ask6155 commented Nov 22, 2017

hello,
I'm having this problem while running my C++ code
It's just a .cpp file

@IlyaBizyaev
Copy link
Author

Hello ask6155,
Please read the discussion above.

@ahrherrera
Copy link

Hi @weinand , I am having problems on Linux Mint Serena 18

I followed the instructions in the guide https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app-xplat/start-mvc

I installed Code correctly, I ran the dotnet new mvc and I opened the Startup.cs file on Code, I press F5, then a popup request me if switch Node JS or .NET Core. Obviously I switch .Net Core, and appears the message.

Hope this info helps.

Note: As you said, when I run code --disable-extensions and I press F5 to debug It only shows Node JS option.

@isidorn
Copy link
Contributor

isidorn commented Dec 8, 2017

@ahrherrera hi. If you are running into this issue please use vscode insiders or wait a week for the next stable release.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants