Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
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

@kjin

Description

@kjin

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:

(function (exports, require, module, __filename, __dirname) { module.exports = function foo(n) { return n; }
});

In Node 10.16+, it yields the original source:

module.exports = function foo(n) { return n; }

This almost certainly affects line-1 breakpoints.

Metadata

Metadata

Assignees

Labels

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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions