-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: correct launch.json for node js debugging through vs code #704
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,21 +308,23 @@ the following launch configuration: | |
|
||
.. code:: json | ||
|
||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach to SAM CLI", | ||
"type": "node", | ||
"request": "attach", | ||
"address": "localhost", | ||
"port": 5858, | ||
"localRoot": "${workspaceRoot}", | ||
"remoteRoot": "/var/task", | ||
"protocol": "legacy" | ||
} | ||
] | ||
} | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [{ | ||
"name": "Attach to SAM CLI", | ||
"type": "node", | ||
"request": "attach", | ||
"address": "localhost", | ||
"port": 5858, | ||
"localRoot": "${workspaceRoot}", | ||
"sourceMapPathOverrides": { | ||
"${workspaceRoot}/runtime": "${remoteRoot}" | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you format the JSON here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely. |
||
"remoteRoot": "/var/task", | ||
"protocol": "inspector", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous protocol was legacy. What does updating this to inspector indicate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is for newer version of nodejs, that is indicated right after in the readme, to swtich to legacy if you are using a older version of nodejs. |
||
"stopOnEntry": false | ||
}] | ||
} | ||
|
||
Note: Node.js versions --below-- 7 (e.g. Node.js 4.3 and Node.js 6.10) | ||
use the ``legacy`` protocol, while Node.js versions including and above | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the ${workspaceRoot}/ right? This localRoot only works if you open the directory of the function code and not the whole project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes correct.