-
Notifications
You must be signed in to change notification settings - Fork 417
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
Add interactive debugging support #42
Comments
I think this would require to start the whole thing with a |
#47 should solve this issue. serverless-offline has debugger support. |
referring to https://github.com/node-inspector/node-inspector#advanced-use Steps to debug locally.
|
@gertjvr thanks. that works. how can i use sourcemaps with this method and use the debugger on prebabel transpiled surces? |
been pulling my hear out, only webstorm seems to be able to debug sourcemaps |
I tried with Webstorm mostly works including editing, but in console I have to use _logger2.default.info() instead of logger.info() In VSCode, I have to put my breakpoints in .webpack folder but it will stop at mapped files. If webstorm can do it, this must be either missing feature on vscode's part or misconfiguration on my part. I cannot get it to listen to the breakpoints in my original source code. In Chrome Debugger, I can put breakpoints in my source code from webpack://./ sources and it will stop at those points. However, my code lies in file://./ so editing is not possible. |
any updates on this? It would be great if we could add an howto directly in the readme |
So after a lot head bashing i managed to get it partially working with webpack. `var templateFn = require('adjust-sourcemap-loader') module.exports = { and then i created a launch.json (which needs tidying up but bare with me).
Now the strange thing is that to be able to breakpoint, i have to follow always this pattern. launch server with vs code, which is the same as launching: If i do this debugging works, However if i do the other way around (which is the logic way to me, please correct me if am wrong),
Now it would be nice to get to the bottom of this, as to why is it happening.
|
I finally got debugging working in vs code with this package: The key to it was to set the devtool to: and in
as far as i can tell this is the only stopping it, however just as an example please find a working version of my config:
This allows me to debug interactively in vscode 1.9.1 with node debugger extension using node v4.3.2 runtime. |
@ricardolpd I'm trying to follow your suggestions (using typescript in my case) and not having any luck so far. Is your project public by chance? I'm wondering if there's something I'm just missing... |
@jamesandersen no sorry the project is private and belongs to my workplace. the key bits for me to get it working with vs code was to use:
in my launch.json i also had to do:
|
Do you know how to make source maps work with code that is not for API Gateway, preferably with node-inspector? |
To debug add: for a complete example try my boilerplate and take a look into |
@aheissenberger 's approach seems to be working to debug. Closing this now. If you don't mind you can also try with a recent plugin version (and the new |
For any future googlers, the solution for me was twofold. I had to make sure the configuration in Webstorm was running with |
@skylarmb For me using VSCode adding |
node-debug/node-inspector or webstorm/vscode can be used in order to debug functions locally.
The text was updated successfully, but these errors were encountered: