Skip to content

Commit e0aec8c

Browse files
committed
fixup! fixup! fixup! debugger: add edit-free runtime expression probes to node inspect
1 parent c97cc47 commit e0aec8c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/internal/debugger/inspect.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,9 +737,14 @@ class ProbeInspectorSession {
737737
for (const { location, probeIndices } of uniqueLocations.values()) {
738738
// TODO(joyeecheung): Normalize relative probe paths and avoid suffix matches that can
739739
// bind unrelated loaded scripts with the same basename.
740+
// On Windows, normalize backslashes to forward slashes so the regex matches
741+
// V8 script URLs which always use forward slashes.
742+
const normalizedFile = process.platform === 'win32' ?
743+
SideEffectFreeRegExpPrototypeSymbolReplace(/\\/g, location.file, '/') :
744+
location.file;
740745
const escapedPath = SideEffectFreeRegExpPrototypeSymbolReplace(
741746
/([/\\.?*()^${}|[\]])/g,
742-
location.file,
747+
normalizedFile,
743748
'\\$1',
744749
);
745750
const params = {

0 commit comments

Comments
 (0)