-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging using breakpoints not working -- missing source map urls? #370
Comments
@atorma I ran some tests and I see the |
I was using IntelliJ IDEA's Mocha run configuration in Windows 10. It executed
My mocha.opts were
However, I got debugging with breakpoints to work when I created a module "register-streamline.js" like this 'use strict';
require('streamline').register({
runtime: 'fibers',
quiet: true,
sourceMaps: 'inline'
}); and then used that as a compiler for *._js in mocha.opts:
However, I still don't see the I haven't tried pre-compiling with babel-plugin-streamline. Running using |
Okay, sourceMappingURLs are generated when pre-compiling sources using babel. However, as the readme says, "The recommandation is to use the loader during development" and "The fibers mode gives superior development experience". I agree and would like to stick to that :) Is there a reason why sourceMappingURLs are not generated in the cached files? |
You could also set the options via a The sourceMappingURL directives are not included in the cached files but they are added dynamically after the source is retrieved from the cache. I don't remember the whole rationale but I think it was done this way to keep the cache independent from the source-map options. |
With option |
I am running Mocha tests of Streamlined code (fibers) in IntelliJ IDEA and Node 6.9. Debugging the code using breakpoints is not working. Either the IDE stops at a wrong line or does not stop at all.
I can see source map files are created in the .streamline cache directory. I tried adding a source map url to one of the generated _js files. That got breakpoints working. Should code generation add source map urls in the files?
The text was updated successfully, but these errors were encountered: