You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
Line 1 breakpoint locations may no longer be accurate after 10.16+ #737
api: clouddebuggerIssues related to the googleapis/cloud-debug-nodejs API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
A failing test (testing setting line-1 breakpoints) that is the cause of #729 highlights a potentially breaking change for us in Node 10.16: scripts are now parsed slightly differently. Consider the following code:
module.exports = function foo(n) { return n; }
In Node 10.15 and below, getting the above script via Inspector's Debugger.getScriptSource yields:
rather than source being pre-wrapped with a wrapper, this should ultimately help ensure slightly more accurate information, but it does mean that prior to Node.10.16 the wrapper exists afterwords it does not.
api: clouddebuggerIssues related to the googleapis/cloud-debug-nodejs API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
kjin commentedon Aug 14, 2019
This issue should not be closed until the test skipped in #738 is re-enabled.
bcoe commentedon Aug 16, 2019
@kjin interesting, I remember when this was introduced,
compileFunctionis now used:https://github.com/nodejs/node/blob/master/lib/internal/modules/cjs/loader.js#L856
rather than source being pre-wrapped with a wrapper, this should ultimately help ensure slightly more accurate information, but it does mean that prior to Node.10.16 the wrapper exists afterwords it does not.
kjin commentedon Aug 20, 2019
@bcoe Thanks, I found the PR that caused this change: nodejs/node#21573