# How to develop for Inspector

**URL:** <https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667>\
**Category:** Questions\
**Tags:** inspector, contribution\
**Created:** [April 6, 2023, 1:03pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667 "2023-04-06T13:03:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [April 6, 2023, 1:03pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/1 "2023-04-06T13:03:06Z")

</div>

I found the `packages/dev/inspector/package.json`, run the `npm run watch` and what’s next? I should to open localhost? Which is the port?

Also I found the `packages/dev/inspector/README.md` and instruction:

> ## Contribute
> 
> From the tools/gulp folder:
> 
> ```auto
> npm install
> gulp inspector
> 
> ```

But I do not found the `tools/gulp` folder in the repo, where is it? There are `packages/tools/` but without `gulp` inside.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [April 6, 2023, 1:57pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/2 "2023-04-06T13:57:44Z")

</div>

These instructions are outdated, sorry about that 😅 You can follow the instructions on [Start Contributing to Babylon.js | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/contribute/toBabylon/HowToContribute) instead to build and to see the inspector, it’s better to use the “dev host” or “playground” tasks: [Start Contributing to Babylon.js | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/contribute/toBabylon/HowToContribute#run-the-dev-host)

EDIT: Did a quick PR just to update the inspector readme [update inspector readme by carolhmj · Pull Request #13714 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/13714)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [April 6, 2023, 6:24pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/3 "2023-04-06T18:24:19Z")

</div>

@carolhmj thank a lot!

So, it’s nice longtext, but in fact all I need to work with Inspector is:

```bash
npm ci
npm run serve -w @tools/dev-host

```

And open [http://localhost:1338/](http://localhost:1338/)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [April 7, 2023, 8:51pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/4 "2023-04-07T20:51:59Z")

</div>

@carolhmj sorry, I still doesnt complete understend.  
I run `npm run serve -w @tools/dev-host` and now when I change the code in the `packages/tools/devHost/src/createScene.ts` the serve mode successfully rebuild current version and refresh the page in the browser. But when I make some changes in the `packages/dev/inspector/src/components/sceneExplorer/sceneExplorerComponent.tsx` the Inpsector not rebuilded automatically. An even after manually page refresh the scripts still in the old version. Probably I miss some command? How to work with the Inspector’s code?

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [April 7, 2023, 8:56pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/5 "2023-04-07T20:56:52Z")

</div>

Sorry, I really missed the `npm run serve -w @tools/dev-host`

So, I should run two terminals? One for `npm run serve -w @tools/dev-host` and second for `npm run serve -w @tools/dev-host`, is it proper way?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 7, 2023, 9:52pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/6 "2023-04-07T21:52:32Z")

</div>

cc @RaananW who can detail more when he ll be back from vacations.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [April 10, 2023, 1:20pm UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/7 "2023-04-10T13:20:58Z")

</div>

I think to do it manually you have to run the “Watch” tasks too: `npx build-tools -c dw -wa`, and the serve.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 17, 2023, 11:51am UTC](https://forum.babylonjs.com/t/how-to-develop-for-inspector/39667/8 "2023-04-17T11:51:20Z")

</div>

The dev-host is meant as an es6-playground for the packages, importing directly from the packages. It should compile changes if in watch mode. I am actually in the process of improving it this/next week, so i’ll follow up and fix any issue I find. then it’ll be more stable (and better documented).

A simpler way to get everything compiled for you is to use the babylon-server - `npm run serve -w @tools/babylon-server` , which will make sure to listen to changes on all served packages, including the inspector. You have a few code samples in the babylon-server directory, and you can also load snippets, similar to the way the playground is working. Does that help you move forward?
