Visual Studio Code - Intellisense for Phaser.js?

Recommended Posts

Does anyone know if there has been an Intellisense implementation I can use with Visual Studio Code for Phaser.js (vanilla JavaScript)?  I know there are TypeScript definition files maintained, though I do not really want to use TypeScript.

I think it would be considered a Language Extension - using the VSCode vernacular.

Anyone know what it would take to create a VSCode extension for Phaser?

@Arian FornarisYou created a plugin for Sublime, would you have any input on this?

Thanks in advance,


Share this post

Link to post
Share on other sites


I did a test some days before and it just worked :)


Just follow these steps:

1- Open a folder in VSCode

2- Create a `jsconfig.json` file at the root of that folder. That file indicates to VSCode that it is a JavaScript project. Just put inside that file this content:


3- Create a `defs` folder and copy there the Phaser typescript definitions. I just named it `defs` but you can use your own name.

4- Create a new `game.js` file and write some code there, it should auto-complete the Phaser API.



I think VSCode uses the TypeScript tooling also to develop JavaScript, but with a type inference engine called Salsa.

If you have any issue tell me.


Share this post

Link to post
Share on other sites

It is not working. I am using the 2.6.2 versions of phaser.js and *d.ts files. The latest version of VSCode 1.8.1. Also included are the extensions i have installed.

I don't need to tell it to look for the defs folder anywhere do I? Will VSCode find the ts files?




Share this post

Link to post
Share on other sites

OK, I got it to work. I had to move some folders around. I moved my lib folder under the js folder to be at the same level as the defs folder. So all of my JS files were under the js folder structure.

Thank you! Works slick.


Share this post

Link to post
Share on other sites

@cdelstad @PhaserEditor2D Long Shot since this is a bit older thread, but I'm having trouble just like you did cdelstad, where it's just not picking it up. I can do it fine in a local test folder, but I'm working with an FTP connection directly to my server and it's not working for that.

I rearranged the folders and everything with no luck. Here's a screenshot of my structure:

Hoping that one of you sees this and comes back around to this post!


Share this post

Link to post
Share on other sites

Thanks again. For anyone else that might come across this, I was able to find a workaround. I pulled my site down from the FTP into a Dropbox folder. I then use Microsoft Flow to put listeners on the Dropbox folders than when my files are created, modified, or deleted, the Dropbox contents are synced up to the FTP site.

This allows me to edit the files in a local folder structure within VSCode, and so the above steps work for me now to get the Intellisense for Phaser.

Now onto business. Thanks again.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.