jeromeetienne / threejs-inspector

chrome devtool extension to debug three.js
https://chrome.google.com/webstore/detail/threejs-inspector/dnhjfclbfhcbcdfpjaeacomhbdfjbebi
198 stars 46 forks source link

Went into a debugger: dafuc??.. #26

Open fritx opened 7 years ago

fritx commented 7 years ago

https://github.com/jeromeetienne/threejs-inspector/blob/cb2cf92accb3fb921e260e50c2c662c10312b8ae/src/panel/inspected-win/10-inspected-win-classnames.js#L6-L15

That was interesting.

I was running a vue application in my computer. I had three and vue-threejs as dependencies.

I was npm-linking the vue-threejs locally, so that I could use my local version. However, vue-threejs included a three in its devDependencies, instead of expected one in my vue application! (I think it was due to the behavior of node_modules search..)

So there are TWO different versions of three, when I run my vue application!! (I know that was an edge case.)

Now my solution is to npm-link three in both projects, so that the three can be one single version in them.

Should threejs-inspector consider the case or not?

garyo commented 5 years ago

I get this too. I'm also using Vue and my own build of three.js, but I'm ensuring my three.js build is used everywhere (I don't have two copies). I'm using webpack and loading three as a module: import * as Three from 'three' and then setting window.THREE = Three for this inspector. I'm also doing InspectedWin3js.getInspectedScene = function() { return window.scene; } in the console (as referenced in a different issue) because the inspector doesn't find my scene unless I do that. But once I do, I get dropped into the debugger at this "dafuc" line and can't get any further.

armandn commented 5 years ago

I also get this error every time I select an object. Doesn't happen to all objects. I have some generated meshes that are selected fine and some loaded meshes that produce this error. I'm not using Vue.

fritx commented 5 years ago
if (object instanceof THREE[ InspectedWin3js._threeJSClassNames[ j ] ])

I guess, we should have another way to take place of instanceof detection, since it would break if there are multiple THREE instance, in my case above

mathyouf commented 3 years ago

Just fyi this is still broken