This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Using node option --inspect #932
Labels
Comments
👍 Curious, did you ever find a way to do this? |
Need a way to debug my node application with pkg. Anyway possible ways? |
thanks a lot for the awesome work on pkg yes please, it is really critical to debug applications. we have tried what was mentioned and it does not even build on windows giving error and this is blocker for us |
apt install patch |
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label |
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit. |
This was referenced Feb 12, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello!
From what i read, I understand that you removed debugging for security reasons, but is there a way to make it work anyway ? I read #93 and I don't think it's up to date anymore.
I ran a node:12.16.1 container and installed pkg locally in it. In
node_modules/pkg-fetch/patches/node.v12.16.1.cpp.patch
, I removed the node_options.cc block which seemed to me to be the one blocking the use of inspect.Then i used the local pkg to build the application :
node node_modules/pkg/lib-es5/bin.js path/to/server.js --debug -b -t host --options inspect
But I still get
/root/.pkg-cache/v2.6/built-v12.16.1-linux-x64: bad option: --inspect
during compilation.I looked at the node_options.cc file in
/tmp/VpJIGdcFfQzWrlk73Sd2/node/src/node_options.cc
and i don't see thereturn
I removed, so I guess my patch modification worked but it was not enough ?Am i missing something to change in the patch ? https://github.com/vercel/pkg-fetch/blob/master/patches/node.v12.16.1.cpp.patch
Or maybe there is already a baked-in way to make it work ? Like NODE_OPTIONS or SIGUSR1 ?
The text was updated successfully, but these errors were encountered: