eterps Posted May 11, 2013 Share Posted May 11, 2013 I've been trying over the past week to get a decent dev environment set up in both Linux and OS X, but not with much success. Webstorm's Typescript support isn't much help, the plugins for Sublime Text 2 are outdated and unmaintained aside from syntax highlighting, and I can't seem to get sourcemaps working correctly in Chrome. Very frustrating. Jesse Freeman's grunt task setup was a nice victory. It runs without issue, but does not support source maps out of the box, so debugging in a browser is difficult. I was able to generate all the sourcemaps via the command line for game.js and all the Phaser files, but they don't seem to do much good when the browser is running a concatenated .js file. Anyone have any success on Mac or Linux setting up a dev environment with live debugging? Link to comment Share on other sites More sharing options...
rich Posted May 11, 2013 Share Posted May 11, 2013 I use WebStorm on my Mac without any real issues. It knows how to handle code-insight into the projects and TypeScript and displays the parameters and docs correctly. I don't use it for compiling though (instead using the grunt file in the phaser repo to compile on save) but it still picks up errors. I ought to try and use it to compile an project and write a short guide for it rather than relying on grunt. Link to comment Share on other sites More sharing options...
eterps Posted May 11, 2013 Author Share Posted May 11, 2013 Yeah, I was pretty impressed by Webstorm at first, because of the code completion tools, but I still can't figure out a decent way to get live debugging working - either in Webstorm or Chrome Dev Tools. What do you do to debug? Just console.log messages? Link to comment Share on other sites More sharing options...
Chris Posted May 11, 2013 Share Posted May 11, 2013 Grunt [...] does not support source maps out of the box Sorry, thats just wrong. grunt-contrib-uglify supports sourcemaps out of the box. I am working with PHPStorm all day (WebStorms "big brother") but am doing my JavaScript debugging completely with chrome dev tools. What exactly is your problem with using them? Link to comment Share on other sites More sharing options...
eterps Posted May 11, 2013 Author Share Posted May 11, 2013 Sorry, I did not mean grunt in general does not support sourcemaps, of course it does. I meant Jesse Freeman's grunt script 'as-is' does not generate source maps. You can just add 'sourcemaps: true' to the typescript options and it will generate sourcemaps using the typescript compiler. What I can't figure out is how to do live debugging using those sourcemaps. Link to comment Share on other sites More sharing options...
rich Posted May 11, 2013 Share Posted May 11, 2013 For what it's worth I do virtually every bit of debugging while building Phaser using the chrome dev tools, have yet to really find a feature I needed that they don't have (break points, var watches, etc) Link to comment Share on other sites More sharing options...
eterps Posted May 11, 2013 Author Share Posted May 11, 2013 Do you debug your Typescript files in Chrome? Or compiled javascript? Link to comment Share on other sites More sharing options...
rich Posted May 12, 2013 Share Posted May 12, 2013 As JavaScript in Chrome. I use VS to catch all the compile time errors, which gets all the serious bugs and typos, and then just let Chrome handle the run-time / logic related ones. Link to comment Share on other sites More sharing options...
Recommended Posts