Webstorm 6 - Debug option disabled when coffee-script enabled with node.js and duplicate tests

Hey guys, having a couple issues with the new Webstorm 6 and hoping you can help

The first issue is ive been trying unsucessfully to get debugging working within a webstorm project when "Run with coffeescript plugin" is enabled.

As soon as I check the "Run with coffee script option" within my configuration settings and set the appropriate "path to coffee script executable" my debug option under the run menu disables.
Run is still available and works fine but ofcourse no break points get hit.
Capture1.png
There is my current configuration.




The other problem is far simpler, when running my unit testing configuration my tests are being duplicated. It appears the coffee-script and the generated js files are both running (confirmed by deleting the js file, leaving just coffee file, and this worked correctly), is there any way to prevent the .js files from being executed.  Its not a huge deal to have both run more of a minor inconvenience.

6 comments

If you will use CoffeeScript file watcher, generated js files will be excluded from completion and resolving. Maybe it will solve your problem with tests.

0

Still experianced problems with duplicate tests using file watcher, as a simple solution i changed the output location of the js files (using the file watcher), little hacky but it works.

0

Where are generated *.js files located? In the same directory with *.coffee or in a separate directory (for example, generated/)?
Are there duplicated tests if you run your nodeunit tests from console?

0

The outputed js files were alongside the coffee files when duplicate testing occured exact structure was

ProjectDir/Tests/testfile.coffee
ProjectDir/Tests/testfile.js

I ended up using the structure which resolved the duplicate test problem

ProjectDir/Tests.src/testfile.coffee
ProjectDir/Tests.compiled/testfile.js



although in order to get the sourcepath macros working I had to mark both directories as test directories and I setup unit testing configurations to run either directory.
0

My point is that if generated JavaScript files are alongside the coffee files then test duplication is also occur in console:

$ nodeunit ProjectDir/Tests


So IDE just repeats this behavior. It's possible to fix that, but a better option would be to place generated JavaScript files into another directory (for example ProjectDir/Tests.compiled as you did). Doing that will preserve IDE behavior being identical to the console one.

although in order to get the sourcepath macros working I had to mark both directories as test directories and I setup unit testing configurations to run either directory

Could you please provide more details about the problem. What "sourcepath macros" aren't working? Thanks.

0

Please sign in to leave a comment.