-
Notifications
You must be signed in to change notification settings - Fork 9
wskdebug does not work with new vs code debugger #74
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
Comments
Fix with new vs code debugger nightly
|
- detect problematic case and print big warning and help - document in readme
An initial improvement is in for the upcoming 1.3 release (detect problematic case & warn user, updated documentation). Keeping this issue open to track the changes on the VS code side and make any updates to the code or in documentation once those are released. |
VS Code July 2020 release (1.48.x) includes the necessary changes enabling use of wskdebug with the new debugger, except for proper shutdown handling microsoft/vscode-js-debug#630. We could update the documentation accordingly now. |
@alexkli so to be clear, VS Code 1.48.x does NOT need this fix, and the wskdebug module (v1.3.0) available on npmjs today will work with VSCode 1.48.x (other than the inability to exit the debugger process) |
@davidjgonzalez with VS Code 1.48.x you have to use a different config in |
so would a 1.48.x compat launch.json look like:
Im not sure where the your example snippet in #74 (comment) "ends" and the "normal" config resumes for it to work properly. |
@davidjgonzalez I believe so, but we'll provide updated documentation soon. this has to be tested first (I haven't tested anything with 1.48.x yet, only with that older nightly from some weeks ago). For now the simplest as end user is to use the |
VS Code now supports Need to test this and document. |
document new VS Code launch config starting with VS Code 1.48
The new launch config works fine. Documentation update in #82. |
document new VS Code launch config starting with VS Code 1.48
Uh oh!
There was an error while loading. Please reload this page.
Update: Solution 🎉
If you are coming here from the warning given by wskdebug
WARNING: wskdebug itself is debugged and likely NOT the action
, then you have to update your VS Code launch config.Starting with VS Code 1.48+ these settings are required to work with
wskdebug
:Here is a complete example - adjust the
args
andname
as needed:This is also documented here: https://github.com/apache/openwhisk-wskdebug#nodejs-visual-studio-code
.
.
.
Original issue:
Problem
The new VS code debugger recently released (?) no longer sets
--inspect-brk=XXXX
for the debug port whichwskdebug
can intercept, but instead sets aNODE_OPTIONS
with a custom--require
that loads a (large) VS code javascript file into the process which apparently sets up debugging internally. This leads to thewskdebug
node process itself being debugged, not the actual action on the container.Links
Collecting all solutions here, will be kept updated.
Quick Workaround
Simple workaround for now: Disable the new debugger in VS Code by setting this in the user settings json:
This will work as long as VS Code supports this feature.
Future fix
The new VS Code debugger will get some changes that make it work with
wskdebug
. To get a preview, one has to install the VS code debugger nightly. Do this at your own risk.wskdebug
1.3.0 RC. install the pre-release from github directly:The text was updated successfully, but these errors were encountered: