Closed sapphi-red closed 1 month ago
The string you put in there is not a valid URL. File URLs should generally begin with file:///
. Encoding it as a URL properly will allow for escaping of spaces.
This is not a behavior controlled by the debugger, source URL parsing happens in V8/Chrome and in your case it's not parsing correctly:
{
"method": "Debugger.scriptParsed",
"params": {
"scriptId": "1215",
"url": "",
"startLine": 0,
"startColumn": 0,
"endLine": 14,
"endColumn": 2,
"executionContextId": 1,
"hash": "d9e778e08830bd227d1eaf933031d1e1836746f0ee5975a848444afccff251d0",
"executionContextAuxData": {
"isDefault": true
},
"isLiveEdit": false,
"sourceMapURL": "<data source map url>",
"hasSourceURL": false, // <-
"isModule": false,
"length": 1181,
"stackTrace": {
"callFrames": [
{
"functionName": "instantiateModule",
"scriptId": "215",
"url": "file:///C:/Users/green/Downloads/foo%20bar/sveltekit-debug-vscode-main/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js",
"lineNumber": 52905,
"columnNumber": 23
}
]
},
"scriptLanguage": "JavaScript",
"embedderName": ""
}
}
Thanks for the response!
Describe the bug When
// #sourceURL=
has an URL containing space, the transformed file is shown instead of the original file.To Reproduce Steps to reproduce the behavior:
C:\Users\green\foo bar\sveltekit-debug-vscode
)http://localhost:5173
anonymous
) is shown instead of the original file (ESM exportingload
function).Log File vscode-debugadapter-e6485847.json.gz
VS Code Version: 1.93.1
Additional context It did not work even if I escaped the space with
%20
.Original issue: https://github.com/vitejs/vite/issues/17977, https://github.com/sveltejs/kit/issues/12625