Nikos Posted January 5, 2015 Share Posted January 5, 2015 I'm trying to debug the CreateSphere method in webstorm but when I ctrl click it, it takes me to a t.ds file. Also when I try step into the method when debugging nothing happens. Any ideas how to achieve this? Maybe I should use TS instead of ES6, but I don't really want to. /**** User controllable unit*/export defaultclass Core {constructor(scene) {this.sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene);this.isSelected;//selected units receive commandsthis.modifiers = [];//powerups,sheldss etcthis.currentCommands = [];//todo investigate queued commands}} Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 5, 2015 Share Posted January 5, 2015 The best solution in this case would be to include the TS files of Babylon (Which is not an easy task, as IntelliJ doesn't really work like Visual Studio when it comes to TypeScript) or remove the declaration file. If you don't use typescript, the 2nd option is the best one for you. If you do, you'll have some problems without it. I use both visual studio and intelliJ (depends on the project) and have configured intelliJ to show me the declaration from both .d.ts file and the .js file. This way I can choose to which declaration it should go. Works great (usually). Quote Link to comment Share on other sites More sharing options...
Meulta Posted January 5, 2015 Share Posted January 5, 2015 Hello, Did you try to use the babylon.debug.js file instead of the babylon.js ? Meulta Quote Link to comment Share on other sites More sharing options...
Nikos Posted January 5, 2015 Author Share Posted January 5, 2015 The best solution in this case would be to include the TS files of Babylon (Which is not an easy task, as IntelliJ doesn't really work like Visual Studio when it comes to TypeScript) or remove the declaration file. If you don't use typescript, the 2nd option is the best one for you. If you do, you'll have some problems without it. I use both visual studio and intelliJ (depends on the project) and have configured intelliJ to show me the declaration from both .d.ts file and the .js file. This way I can choose to which declaration it should go. Works great (usually).I wrote a Canvas spaceinvaders game with typescript and quite like it, but want to see how far I can get with es6. Might even try es7 https://github.com/dslomov-chromium/typed-objects-es7 Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 5, 2015 Share Posted January 5, 2015 Does Webstorm play nicely with es7? I know it has es6 support, never actually tried es7. Too early I think :-) Quote Link to comment Share on other sites More sharing options...
davrous Posted January 5, 2015 Share Posted January 5, 2015 Hi, TypeScript generate source map files to be able to debug our original TS code rather than the pure JS version. I've explained how it works in this article: http://blogs.msdn.com/b/davrous/archive/2014/08/22/enhance-your-javascript-debugging-life-thanks-to-the-source-map-support-available-in-ie11-chrome-opera-amp-firefox.aspx You can easily disable that by simply removing the source map line at the end of the JS file. Your browser and/or IDE will then simply show you the JS version to debug. Bye, David Quote Link to comment Share on other sites More sharing options...
Nikos Posted January 5, 2015 Author Share Posted January 5, 2015 Hello, Did you try to use the babylon.debug.js file instead of the babylon.js ? Meultawhere is this file? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 5, 2015 Share Posted January 5, 2015 here : https://github.com/BabylonJS/Babylon.js => babylon.2.0-alpha.debug.js or babylon.1.14-debug.js Quote Link to comment Share on other sites More sharing options...
Nikos Posted January 5, 2015 Author Share Posted January 5, 2015 oh, my bower install didn't have that file, I'll try a bower update.. edit---- hmm I still get 1.10 after update, should I just clone the repo manually? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 5, 2015 Share Posted January 5, 2015 I think so. Meulta is working on Bower update btw Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.