-
Notifications
You must be signed in to change notification settings - Fork 288
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
Supporting debugger with ncc run #298
Comments
This is likely due to ncc using the v8 cache through VM. Perhaps try:
|
Although that will just allow you to debug ncc itself I guess, the run process is still being forked so the inspect flag won't be supported. I don't think this is actually possible any other way though due to the child process mechanics of run. |
Can someone point me in the direction how to debug an app, that uses imports and needs compilation because of that? |
Related to #316 @benseitz I was going to suggest using either @guybedford Can you confirm if this is a bug: git clone https://github.com/styfle/ncc-bug-sourcemap
cd ncc-bug-sourcemap
yarn
yarn build # builds with tsc proper
node --inspect-brk dist/index.js # attaches and breakpoints work in .ts
rm -rf dist
ncc build index.ts --source-map --no-source-map-register
node --inspect-brk dist/index.js # attaches but no breakpoints in .ts That repo has a VS Code "attach" task you can use to compare the two source maps. |
@styfle great points... yes we should support this workflow somehow! So the reason we don't get the breakpoints is because the source map by default emits paths like In fact by default webpack emits It should be possible to output properly relative source maps paths though. I've created #319 to track this further. |
Is there a way to get the debugger working today? I see #319 is merged but I still am unable to get breakpoints triggering. I'm using WebStorm as a debugger. |
Running
ncc
with the node--inspect
flag like soreturns following error:
Starting inspector on 127.0.0.1:9229 failed: address already in use
This seems to be related to nodejs/node#9435.
If I first build and debug the builded output (with source maps) it kind of works, but the debugger shows me the
index.js
(nicely formatted) and not the original files.Does anyone have a successful debugging setup and care to share their experiences? (I'm using VS Code)
The text was updated successfully, but these errors were encountered: