-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Allow debugging of native addons on macOS #34340
Labels
macos
Issues and PRs related to the macOS platform / OSX.
Comments
@nodejs/platform-macos |
@ggreco If you want to open a pull request, the entitlements used by our build process are in https://github.com/nodejs/node/blob/master/tools/osx-entitlements.plist. |
see also nodejs/help#2817 |
ggreco
added a commit
to ggreco/node
that referenced
this issue
Jul 15, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement. This will solve the issue: nodejs#34340
ggreco
added a commit
to ggreco/node
that referenced
this issue
Jul 15, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement to be added to the codesign procedure. Fixes: nodejs#34340 nodejs#34340
I created a pull request to fix this issue: |
MylesBorins
pushed a commit
that referenced
this issue
Aug 17, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement to be added to the codesign procedure. PR-URL: #34378 Fixes: #34340 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
BethGriggs
pushed a commit
that referenced
this issue
Aug 20, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement to be added to the codesign procedure. PR-URL: #34378 Fixes: #34340 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
pushed a commit
that referenced
this issue
Sep 22, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement to be added to the codesign procedure. PR-URL: #34378 Fixes: #34340 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
pushed a commit
that referenced
this issue
Sep 22, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement to be added to the codesign procedure. PR-URL: #34378 Fixes: #34340 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
richardlau
pushed a commit
that referenced
this issue
Oct 7, 2020
To debug native modules node should be a debuggable process, that will require the **com.apple.security.get-task-allow** entitlement to be added to the codesign procedure. PR-URL: #34378 Fixes: #34340 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps will reproduce the bug?
Open a terminal window
launch LLDB (the clang debugger) with the node executable (the official 14.3 and 12.x versions have the same problem
lldb /usr/local/bin/node
run -v
the result is:
error: process exited with status -1 (Error 1)
How often does it reproduce? Is there a required condition?
It's 100% reproductable on catalina if the SIP (system integrity protection) is active.
What is the expected behavior?
The node binary should dump the version and quit, ie:
What do you see instead?
The node binary cannot be debugged:
Additional information
The node binary miss the DEBUG entitlement, com.apple.security.get-task-allow , so lldb cannot attach to it nor launch it in debug mode.
The following command show the list of entitlements in the binary signature.
Here is the output of the command (in the pkg archive, or in the tar.gz, both for 12.x and 14.x):
Without debugging entitlements it's not possible to debug native modules with the official node binaries from nodejs.org. Entitlements can be added only when signing the binary.
Workarounds
Disable "hardened runtime" system-wide on osx (not suggested)
Use a self-built node executable (not suggested)
REPLACE node signature with your own (suggested):
Here is the contents of an entitlements.txt with the missing entitlement added:
The text was updated successfully, but these errors were encountered: