This is an Excalibur.js debuggable template for the following environment.
- Vite
- VSCode
You can easily debug on VSCode by using this template.
- Node.js
-
Open this repository by VSCode.
-
Open the terminal and execute the following command.
npm install
-
Choose the template.
vanilla-template
: A template for the vanilla Excalibur.js.tiled-template
: A template for the Excalibur.js with Tiled Plugin.
-
Edit
.vscode/launch.json
at the following line."webRoot": "${workspaceFolder}/vanilla-template/"
If you want to use
tiled-template
, change the path.(The following description assumes
vanilla-template
.) -
Open any source code in
vanilla-template/src/
.Set the break point by clicking the left point of line numbers. Then, you can see the red circle as shown in the top image.
-
Execute following command.
cd vanilla-template npm run dev
-
Start debug by clicking green button in
Run and Debug
pane.Then, new chrome window will be opened automatically.
-
When the process reach at break point, it will break as expected❗
Execute following command.
npm run build
If there is no error (eg: TypeScript error),
output will be locate dist
directory.
If you want to use Tiled plugin,
all assets used by plugin must be locate in public
directory.
This is due to Vite limitations. Vite controll the files by appending hash to filename. But, Tiled plugin doesn't support hashed filename.
See also Vite doc .
item (description) | author | URL |
---|---|---|
graphics for demo | kenny.nl | https://www.kenney.nl/ |
original template | excaliburjs | https://github.com/excaliburjs/template-ts-vite |
Parcel2 template (deprecated) | tenpaMk2 | https://github.com/tenpaMk2/excalibur-parcel2-vscode-debuggable-template |
Parcel2 Tiled plugin template (deprecated) | tenpaMk2 | https://github.com/tenpaMk2/excalibur-tiled-parcel2-template |
Webpack template (deprecated) | tenpaMk2 | https://github.com/tenpaMk2/excalibur_vscode_debuggable_template/ |