Jump to content

Debug layer is not opening


Hersir
 Share

Recommended Posts

Hi,

tried to open inspector by:

this.getScene().debugLayer.show();

but that produces following errors:

bootstrap:129 Uncaught TypeError: Cannot read property 'bind' of undefined
    at bootstrap:129
    at bootstrap:137
    at universalModuleDefinition:9
    at universalModuleDefinition:1
Uncaught TypeError: Cannot read property 'Inspector' of undefined
    at t.webpackJsonp.1921.t._createInspector (babylon.js:1)
    at HTMLScriptElement.n.onload (babylon.js:1)

I am using babylonjs rc-1, and webpack for packing.

I am missing some new configs ?, as it used to work 2-3 versions ago

could be related to this ?

Thank you

Link to comment
Share on other sites

Tried to use npm version of inspector but there is same error about bind. Off topic npm inspector package is missing dependencies, (babylonjs-gui, babylonjs-loaders, babylonjs-serializers), would be nice to add it in package.json of inspector so they are auto installed, as it doesn't work without them.

Link to comment
Share on other sites

Hi @Hersir,

What environment is running your code? Browser?

Can you check if "https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js" is being downloaded in the background for me?

You are right about the dependencies, this is being taken care of :)

Another small request (with huge thank-you, of course):

Can you try, instead of the .show function, to create your own inspector?

Import Inspector from the package, and:

new Inspector(this._scene, false, 0, null);

 

Link to comment
Share on other sites

Hi @RaananW so all in order :)

System: macOS High Sierra 10.13.6

Browser: Chrome 69.0.3497.100, Safari 12.0, Firefox 62.0

Webpack: 3.12.0

Babylonjs: 3.3.0.-rc.1

Inspector: 3.3.0.-rc.1

Tried:

import { Inspector } from "babylonjs-inspector";
new Inspector(this._scene, false, 0, null);

and

import "babylonjs-inspector";
scene.debugLayer.show();

both produce same bind error at start of load, dont even get to new Inspector or show:

Uncaught TypeError: Cannot read property 'bind' of undefined
    at universalModuleDefinition:1
    at universalModuleDefinition:1
    at webpackJsonp.2525 (universalModuleDefinition:1)
    at Object.2525 (universalModuleDefinition:1)
    at __webpack_require__ (bootstrap 5313bedd0a39528998e1:54)
    at __webpack_require__ (bootstrap 5313bedd0a39528998e1:54)
    at __webpack_require__ (bootstrap 5313bedd0a39528998e1:54)

Without import, just using show:

File https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js is loaded successfully, but global INSPECTOR is still undefined when it tries to show, because of bind error before.

Can give more info if needed :)

Link to comment
Share on other sites

@RaananW sorry wrong wording from my side, I meant that 

import "babylonjs-gui";
import "babylonjs-loaders";
import "babylonjs-serializers";

dont have any errors if included, but 

import "babylonjs-inspector";

still have bind error as before

I also tried rc4 but have same issue, and `babylonjs-serializers` is still missing if inspector is installed from npm.

I would bet on webpack version differences ,as cold be that dependency bundling was changed from wp3 to wp4.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...