Sign in to follow this  

How To Start/Debug on BJS.

Recommended Posts


As I have seen quite a few times questions about setting up the dev environment and how to debug typescript and so on, I Changed a bit the dev process in th repo (for good I hope :-) )

You can find the entire doc here:

It is mostly explaining how to use VSCode, but you could use any editor suporting chrome debugging. The number of steps after installing the tools is really short:

  1. npm install
  2. run the test task
  3. press f5

This helps debugging both typescript and javascript on Chrome directly from breakpoint in vscode. This includes watchers and webserver hook for you on VsCode.

Do not hesitate to try it, give feedback, and update the doc.



Share this post

Link to post
Share on other sites

Your doc shows many things i did not know. Am attempting to use Windows 10 (but have to disable NVidia 960 driver or lose signal).  If that is fixable would allow testing with Edge.  Some questions though:

  • You illustrate with Visual Studio Code & Cmder.   Do those 2 play together?  I get "It looks like git is not installed on your system" in VSC.  If git is only available from Cmder this way, would it not be better to do and the smaller Cmder?   I like the unix syntax coming from ubuntu /  OSX, having to everything with git as command-line is tedious though.
  • I am not sure I can use VSC though.   I added the Python add-in, but if I have to make the Blender zip file by leaving, I'll need to stick with Eclipse.  I have built that zip more times in one day then I would like to admit.  I see there is a .vsccode directory with tasks described in the repo.  Not sure how you would even trigger them in VSC, but can there be other tasks to build other things like the Blender & 3DSMax zip files.  I cannot even figure out how to register the intellisense to use babylon.d.ts.  That is simple with the Eclipse Typescript plugin.  This is my ANT script I run from Eclipse.  It  could be simplified if the scr directory were just renamed to  "bablyon-js"
<?xml version="1.0" encoding="UTF-8"?>
<project name="zipper">
	<property name="version" value="5.1"/>
	<property name="mountPoint" value= "/js-dev"/>
	<property name="project"    value= "${mountPoint}/Babylon.js"/>
	<property name="blender"    value= "${project}/Exporters/Blender"/>
	<property name="src"        value= "${blender}/src"/>
	<property name="temp-dir"   value= "${blender}/temp"/>
	<property name="BJS-dir"    value= "${temp-dir}/babylon-js"/>
    <!-- ===================== Minify Section ============================ -->
    <target name="make-zip">
        <delete dir="${BJS-dir}" quiet="true"/>
        <delete dir="${temp-dir}" quiet="true"/>
        <mkdir  dir="${temp-dir}"/>
        <mkdir  dir="${BJS-dir}"/>
        <copy todir="${BJS-dir}">
        	<fileset dir="${src}"/>
    	<zip destfile="${blender}/Blender2Babylon-${version}.zip" basedir="${temp-dir}" level="9"></zip>
        <delete dir="${BJS-dir}" quiet="true"/>
        <delete dir="${temp-dir}" quiet="true"/>



Share this post

Link to post
Share on other sites

I use locally both cmder and VScode, but you could do with only one of them, it is really a question of preference as they are only launching commands. yep agree for git-scm but still with the bigger cmder cause as it is portable, sync the folder and you can use it on any machines in case of need ;-) Could you do a PR on the doc ?

All the task from gulp are available but you ll need to use the gulp launcher cause VSC does not support mixed command so far (it is on their list for soon). About intellisense, we have it everywhere in VSC for ts and js. We usually have a ref to the .d,ts and you can add a typescript config file to your folder

/// <reference path="../../dist/preview release/babylon.d.ts"/>



Share this post

Link to post
Share on other sites

Thanks, but one task per directory / project is not going to work for me, so will stick with eclipse for now.  Not sure I know enough to edit that file, not to mention I have many migration problems to handle.  I gave VSC a look, but too different.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.