Devtool can't parse sourceUrl on windows
Reported by
j3l11...@gmail.com,
Nov 29 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce the problem: 1. node --inspect ./index.js 2. open the chrome inspector What is the expected behavior? the source panel should display index.js on 'file://' protocol What went wrong? the index.js is on 'no domain' Did this work before? No Chrome version: 62.0.3202.94 Channel: stable OS Version: 10.0 Flash Version: refer to https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js?l=539 ``` // Support file URL for node.js. if (this.target().isNodeJS() && sourceURL && sourceURL.startsWith('/')) { var nodeJSPath = sourceURL; sourceURL = Common.ParsedURL.platformPathToURL(nodeJSPath); sourceURL = this._internString(sourceURL); this._fileURLToNodeJSPath.set(sourceURL, nodeJSPath); } else { sourceURL = this._internString(sourceURL); } ``` That won't work for Windows file paths. unix path is like /usr/index.js , it works windwos path is lile D:\index.js, it does not works It shoule be: ``` if (this.target().isNodeJS() && sourceURL && (sourceURL.startsWith('/') || sourceURL.match(/^[A-Za-z]:\\/))) { ```
,
Nov 30 2017
Yes! My problem is the same! I've made a proxy to transform path in the websocket communication.
,
Nov 30 2017
,
Jan 3 2018
Andrey, I know that you have a patch! :)
,
Jun 27 2018
@lushnikov@chromium.org how is it going ? |
|||
►
Sign in to add a comment |
|||
Comment 1 by pfeldman@chromium.org
, Nov 30 2017Status: Assigned (was: Unconfirmed)