Open she11sh0cked opened 4 years ago
Issue solved by first reinstalling VSCode (also deleting %userprofile%/.vscode
and %appdata%/Code
) and then opening a .kt file.
This triggered the installation of the language- and debug server. (Strangly this did only work after reinstalling VSCode)
I'm keeping this issue open because it isn't documented, that you need to open a .kt file to install the the language- and debug server
Well... I was too fast to comment. It didn't work anymore after I synced my extensions with settings sync.
I get this error in the Developer Tools console after i install or uninstall the vscode-kotlin extension:
Error: Cannot invoke loadWASM more than once. | mainThreadExtensionService.ts:66
at Object.t.loadWASM (c:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\vscode-oniguruma\release\main.js:1:4823)
at TextMateLoader.loadOniguruma (c:\Users\erikberressem\.vscode\extensions\coenraads.bracket-pair-colorizer-2-0.1.2\out\src\textMateLoader.js:123:19)
at new TextMateLoader (c:\Users\erikberressem\.vscode\extensions\coenraads.bracket-pair-colorizer-2-0.1.2\out\src\textMateLoader.js:19:31)
at new Settings (c:\Users\erikberressem\.vscode\extensions\coenraads.bracket-pair-colorizer-2-0.1.2\out\src\settings.js:10:31)
at new DocumentDecorationManager (c:\Users\erikberressem\.vscode\extensions\coenraads.bracket-pair-colorizer-2-0.1.2\out\src\documentDecorationManager.js:9:25)
at restart (c:\Users\erikberressem\.vscode\extensions\coenraads.bracket-pair-colorizer-2-0.1.2\out\src\extension.js:42:37)
at c:\Users\erikberressem\.vscode\extensions\coenraads.bracket-pair-colorizer-2-0.1.2\out\src\extension.js:7:43
at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:46:67)
at s.deltaExtensions (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:588:215)
at h.$deltaExtensions (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:830:50)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Here is a list of my extensions:
aaron-bond.better-comments
ban.spellright
bierner.emojisense
bierner.markdown-mermaid
bierner.markdown-preview-github-styles
CoenraadS.bracket-pair-colorizer-2
CoenraadS.disableligatures
cssho.vscode-svgviewer
darkriszty.markdown-table-prettify
DavidAnson.vscode-markdownlint
dbaeumer.vscode-eslint
donjayamanne.githistory
DotJoshJohnson.xml
dracula-theme.theme-dracula
drKnoxy.eslint-disable-snippets
dsznajder.es7-react-js-snippets
eamodio.tsl-problem-matcher
fabiospampinato.vscode-statusbar-debugger
formulahendry.code-runner
fwcd.kotlin
Gruntfuggly.todo-tree
hedinne.stylelint-disable-snippets
hnw.vscode-auto-open-markdown-preview
IBM.output-colorizer
kisstkondoros.vscode-gutter-preview
kumar-harsh.graphql-for-vscode
mikestead.dotenv
ms-vscode-remote.remote-wsl
msjsdiag.debugger-for-chrome
naco-siren.gradle-language
naumovs.color-highlight
notZaki.pandocciter
NuclleaR.vscode-extension-auto-import
pflannery.vscode-versionlens
phr0s.bib
PKief.material-icon-theme
richardwillis.vscode-gradle
richie5um2.vscode-sort-json
ritwickdey.LiveServer
s-nlf-fh.glassit
sburg.vscode-javascript-booster
Shan.code-settings-sync
stevencl.addDocComments
stkb.rewrap
stylelint.vscode-stylelint
tomoki1207.pdf
usernamehw.errorlens
vilicvane.sensitive-replace
VisualStudioExptTeam.vscodeintellicode
Vtrois.gitmoji-vscode
WallabyJs.quokka-vscode
I went through and checked every extension in my list. The following extensions resulted in vscode-kotlin not working:
I can confirm that the vscode-gradle extension collides with this one. Looks like we can either have Gradle, or Kotlin. :)
I also have a problem of code beeing duplicated when formatting
any movement here? Is the gradle extension creator aware of this issue?
I switched to developing kotlin under a wsl / ubuntu setup. The extensions works (mostly) as expected under these conditions. Last time i checked the the code duplication and gradle issues were no more, but dependencies weren't resolved.
After reading through the comments of this issue, I almost believed I'd have to completely reinstall VSCode. Fortunately, after reading through the console in VSCode's developer tools, I noticed logs stating something along the lines of "Debugger disabled because kotlin.debugAdapter.enabled
was set to false
". I went to my settings.json
to investigate. Sure enough, it was set to false
, but right above it, kotlin.languageServer.enabled
was also set to false
!
So, I set both to true. Immediately after enabling, it instantly kicked into action, even with richardwillis.vscode-gradle
installed. Thinking back, I think I did skip over some initial prompts the extension gave me. Although it is very weird it would have set it to false over just skipping some introductory notification. So, before reinstalling and scrapping all your VSCode configs, try changing that setting to true
. :)
+1 for @danii's solution!
Description
Launching a kotlin debug configuration results in the following error message:
And the following error in the developer tools console:
Running "Kotlin: Restart the Language Server" from the Command Palette results in the following error message:
(the same error is also in developer tools console)
Additional context
There is also no mention of kotlin in my Extension Host log
Reproducing
Create the following debug configuration:
Launch the configuration
See error
Environment
Extension: 0.2.11
VSCode: 1.45.0 microsoft/vscode@d69a79b73808559a91206d73d7717ff5f798f23c
OS: Microsoft Windows 10.0.18363