Skip to content
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 help / using --inspect flag throws "error : unknown option" #148

Closed
madebycaliper opened this issue May 1, 2019 · 4 comments
Closed
Labels

Comments

@madebycaliper
Copy link

Hiya. I'm trying to configure VSCode to debug locally and after a couple hours searching and testing I'm opening this ticket and pausing so I can get some guidance. I've added the webpack.functions.js file and referenced it in my script command, but using the --inspect flag throws the error:

error: unknown option `--inspect'
error Command failed with exit code 1.

(I'm using yarn v1.9.4 and netlify-lambda v1.4.5)

Also, the Readme file has the following instructions but, unfortunately, I have no clue what it means or how I would enable this:

If using VSCode, it is likely that the sourceMapPathOverrides have to be adapted for breakpoints to work.

I think there's an assumption that I would be a more seasoned re: Node + Webpack, but I personally don't have much at all. I'm using Netlify to deploy a Vue.js app that leverages Functions as an API layer, so I know the Vue ecosystem way better than Node/Webpack/Lambda.

Having clearer documentation around this would be super helpful. Thank you guys so much for working on this product!

@swyxio
Copy link
Contributor

swyxio commented May 2, 2019

hey! sorry you have so much trouble. that readme is mangled, that is my fault. it came from here #83 so @stefan-- may know better. i'll fix the readme.

as for you - what exactly are you trying to debug? lets get to the root cause here. are you trying to use a custom webpack config?

@madebycaliper
Copy link
Author

Hey @sw-yx thanks for the quick reply. It would be awesome to have a little more clarity in the docs. In regards to what I'm debugging, it has to do with my actual functions app and not with netlify-lambda itself. console.logging only goes so far, and I'm dealing nested async try/catch statements which is kind of confusing to me. Any help would be appreciated.

@swyxio
Copy link
Contributor

swyxio commented May 2, 2019

i did fix the readme already https://github.com/netlify/netlify-lambda#debugging

hmm. if you can use debugger you may be able to step through your js. vscode offers extra help too.

@stale
Copy link

stale bot commented Jul 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants