# How to use the new \`dfx ide\` command

**URL:** <https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241>\
**Category:** Command Line Tools\
**Created:** [November 24, 2019, 11:54am UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241 "2019-11-24T11:54:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [November 24, 2019, 11:54am UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/1 "2019-11-24T11:54:23Z")

</div>

did anyone manage to find out how to use the above mentioned new sub command?from the description it seems like this is a language server but i can’t wrap my head around how to actually use it with vscode for example.

at first i thought if the command is running and you modify the code it’ll show you errors and so on, i also tried typing code in it like an interpreter. no success either ☹

i would appreciate if someone could point me to the right direction.

thanks!

---

<div class="post-metadata">

**Author:** ![dpdp](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/dpdp/32/1143_2.png) [@dpdp](https://forum.dfinity.org/u/dpdp)\
**Post date:** [November 25, 2019, 1:59pm UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/2 "2019-11-25T13:59:23Z")

</div>

I personally run `dfx ide`

Then I press “ENTER”

And I get this

```auto
dp$ dfx ide

The Motoko Language Server returned an error:
Fatal error: exception (Invalid_argument "String.sub / Bytes.sub")
Raised at file "pervasives.ml", line 33, characters 20-45
Called from file "string.ml" (inlined), line 47, characters 2-23
Called from file "languageServer/languageServer.ml", line 125, characters 11-112
Called from file "exes/mo_ide.ml", line 37, characters 5-35

```

---

<div class="post-metadata">

**Author:** ![Alexey](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alexey/32/41_2.png) [@Alexey](https://forum.dfinity.org/u/Alexey)\
**Post date:** [November 25, 2019, 3:16pm UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/3 "2019-11-25T15:16:16Z")

</div>

The same error so far

---

<div class="post-metadata">

**Author:** ![Comp\_Sci](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@Comp\_Sci](https://forum.dfinity.org/u/Comp_Sci)\
**Post date:** [November 26, 2019, 4:11am UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/4 "2019-11-26T04:11:53Z")

</div>

I would also appreciate more info on how to use this functionality as well.

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [November 26, 2019, 8:30am UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/5 "2019-11-26T08:30:16Z")

</div>

i’ll tag some members for visibility  
@stanley.jones @PaulLiu @alexa.smith

---

<div class="post-metadata">

**Author:** ![alexa.smith](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alexa.smith/32/21_2.png) [@alexa.smith](https://forum.dfinity.org/u/alexa.smith)\
**Post date:** [November 27, 2019, 4:32pm UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/6 "2019-11-27T16:32:46Z")

</div>

Thanks for looping us in here. Just wanted to let you know we’re in the process of updating error messages and docs to help with this. Stay tuned!

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [December 6, 2019, 8:12pm UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/7 "2019-12-06T20:12:12Z")

</div>

there has just been a new release that states that there is a topic in the documentation for the now called `dfx _language-service` command!

> [@Release Notes for V0.4.9](https://forum.dfinity.org/t/release-notes-for-v0-4-9/267):
>
> Happy Friday, community! V0.4.9 is now available for download! tada What’s new? New dfx cache commands enable you to check the versions of dfx you have installed and in use. You can use the new dfx cache subcommands to manage the dfx version cache ( ~/.cache/dfinity/versions ) and perform operations such as delete a particular version from the cache or force installation from a version of dfx found in the cache. Previously, dfx version information could be misleading in that …

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [December 6, 2019, 8:15pm UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/8 "2019-12-06T20:15:35Z")

</div>

this is the link:  
[https://sdk.dfinity.org/developers-guide/lang-service-ide.html](https://sdk.dfinity.org/developers-guide/lang-service-ide.html)

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [December 7, 2019, 11:38am UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/9 "2019-12-07T11:38:03Z")

</div>

didn’t really help me though, did anyone make it work? @hansl can you give me a hint? i guess i would need to write a VSCode extension for example? the docs out there show how to write a LS extension, but i don’t get how to make it work with binaries 🧐 is there a simple way to invoke this with VSCode?

---

<div class="post-metadata">

**Author:** ![hansl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/hansl/32/134_2.png) [@hansl](https://forum.dfinity.org/u/hansl)\
**Post date:** [December 8, 2019, 10:24pm UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/10 "2019-12-08T22:24:32Z")

</div>

There’s nothing more to say currently. This is an experimental feature

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [March 3, 2020, 1:56am UTC](https://forum.dfinity.org/t/how-to-use-the-new-dfx-ide-command/241/11 "2020-03-03T01:56:52Z")

</div>

I wrote a little vscode extension!

> [@Motoko extension for VSCode!](https://forum.dfinity.org/t/language-client-extension-for-vscode/502):
>
> I hacked [this little extension](https://marketplace.visualstudio.com/items?itemName=motoko-lsp-client.motoko-lsp-client) together to get code completion and compiler warnings with the dfx \_language-service command. This has been only tested on 0.5.2 and assumes your dfx binary lives in /usr/local/bin/dfx (this should be easy to fix). If you need to change the directory, use which dfx to get the correct path open ~/.vscode/extensions/motoko-lsp-client.motoko-lsp-client-{the-current-version-of-the-extension}/client/out/extension.js modify the path in line 12 to the output of which…
