{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/35978","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/35978/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/35978/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/35978/events","html_url":"https://github.com/Microsoft/vscode/issues/35978","id":264163068,"node_id":"MDU6SXNzdWUyNjQxNjMwNjg=","number":35978,"title":"vscode node debugger parses inline sourcemap incorrectly","user":{"login":"t83714","id":674387,"node_id":"MDQ6VXNlcjY3NDM4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/674387?v=4","gravatar_id":"","url":"https://api.github.com/users/t83714","html_url":"https://github.com/t83714","followers_url":"https://api.github.com/users/t83714/followers","following_url":"https://api.github.com/users/t83714/following{/other_user}","gists_url":"https://api.github.com/users/t83714/gists{/gist_id}","starred_url":"https://api.github.com/users/t83714/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t83714/subscriptions","organizations_url":"https://api.github.com/users/t83714/orgs","repos_url":"https://api.github.com/users/t83714/repos","events_url":"https://api.github.com/users/t83714/events{/privacy}","received_events_url":"https://api.github.com/users/t83714/received_events","type":"User","site_admin":false},"labels":[{"id":291054922,"node_id":"MDU6TGFiZWwyOTEwNTQ5MjI=","url":"https://api.github.com/repos/Microsoft/vscode/labels/debug","name":"debug","color":"1d76db","default":false},{"id":272689392,"node_id":"MDU6TGFiZWwyNzI2ODkzOTI=","url":"https://api.github.com/repos/Microsoft/vscode/labels/feature-request","name":"feature-request","color":"dcdcdc","default":false}],"state":"open","locked":false,"assignee":{"login":"roblourens","id":323878,"node_id":"MDQ6VXNlcjMyMzg3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/323878?v=4","gravatar_id":"","url":"https://api.github.com/users/roblourens","html_url":"https://github.com/roblourens","followers_url":"https://api.github.com/users/roblourens/followers","following_url":"https://api.github.com/users/roblourens/following{/other_user}","gists_url":"https://api.github.com/users/roblourens/gists{/gist_id}","starred_url":"https://api.github.com/users/roblourens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblourens/subscriptions","organizations_url":"https://api.github.com/users/roblourens/orgs","repos_url":"https://api.github.com/users/roblourens/repos","events_url":"https://api.github.com/users/roblourens/events{/privacy}","received_events_url":"https://api.github.com/users/roblourens/received_events","type":"User","site_admin":false},"assignees":[{"login":"roblourens","id":323878,"node_id":"MDQ6VXNlcjMyMzg3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/323878?v=4","gravatar_id":"","url":"https://api.github.com/users/roblourens","html_url":"https://github.com/roblourens","followers_url":"https://api.github.com/users/roblourens/followers","following_url":"https://api.github.com/users/roblourens/following{/other_user}","gists_url":"https://api.github.com/users/roblourens/gists{/gist_id}","starred_url":"https://api.github.com/users/roblourens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblourens/subscriptions","organizations_url":"https://api.github.com/users/roblourens/orgs","repos_url":"https://api.github.com/users/roblourens/repos","events_url":"https://api.github.com/users/roblourens/events{/privacy}","received_events_url":"https://api.github.com/users/roblourens/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/vscode/milestones/8","html_url":"https://github.com/Microsoft/vscode/milestone/8","labels_url":"https://api.github.com/repos/Microsoft/vscode/milestones/8/labels","id":1412124,"node_id":"MDk6TWlsZXN0b25lMTQxMjEyNA==","number":8,"title":"Backlog","description":"Work not yet planned for a specific release.","creator":{"login":"chrisdias","id":1487073,"node_id":"MDQ6VXNlcjE0ODcwNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1487073?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisdias","html_url":"https://github.com/chrisdias","followers_url":"https://api.github.com/users/chrisdias/followers","following_url":"https://api.github.com/users/chrisdias/following{/other_user}","gists_url":"https://api.github.com/users/chrisdias/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdias/subscriptions","organizations_url":"https://api.github.com/users/chrisdias/orgs","repos_url":"https://api.github.com/users/chrisdias/repos","events_url":"https://api.github.com/users/chrisdias/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdias/received_events","type":"User","site_admin":false},"open_issues":2024,"closed_issues":3825,"state":"open","created_at":"2015-11-15T10:30:19Z","updated_at":"2018-07-18T10:10:34Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2017-10-10T09:44:59Z","updated_at":"2018-07-18T16:48:30Z","closed_at":null,"author_association":"NONE","body":"<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. -->\r\n\r\n<!-- Use Help > Report Issues to prefill these. -->\r\n- VSCode Version: 1.17.0 \r\n- OS Version: macOS 10.13\r\n\r\nSteps to Reproduce:\r\n\r\n1. Create an empty folder\r\n2. Add `package.json` with the following content:\r\n```\r\n{\r\n  \"name\": \"vscode-issue\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"\",\r\n  \"main\": \"index.js\",\r\n  \"scripts\": {\r\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\r\n  },\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\",\r\n  \"dependencies\": {\r\n    \"@std/esm\": \"^0.11.3\"\r\n  },\r\n  \"@std/esm\": {\r\n    \"esm\": \"all\",\r\n    \"cjs\": true\r\n  }\r\n}\r\n```\r\n3. Create file `index.js` with the following content:\r\n```\r\nimport path from \"path\";\r\n\r\nconsole.log(path.resolve(__dirname, \"..\"));\r\n```\r\n4. Configure launch.json as:\r\n```\r\n{\r\n    \"version\": \"0.2.0\",\r\n    \"configurations\": [\r\n        {\r\n            \"type\": \"node\",\r\n            \"request\": \"launch\",\r\n            \"name\": \"Launch Program\",\r\n            \"program\": \"${workspaceRoot}/index.js\",\r\n            \"runtimeArgs\": [\r\n                \"-r\",\"@std/esm\"\r\n            ]\r\n        }\r\n    ]\r\n}\r\n```\r\n5.  `npm install`\r\n6. Press F5 to start vscode debugger\r\n7. You will see the following error:\r\n```\r\nDebugging with inspector protocol because Node.js v8.6.0 was detected.\r\nnode --inspect-brk=36570 -r @std/esm index.js \r\nDebugger listening on ws://127.0.0.1:36570/a572c7ff-3251-4ae3-b74c-5abe01c3b73c\r\nDebugger attached.\r\nSourceMaps.getMapForGeneratedPath: exception while processing path: /Users/user/Development/vscode-issue/index.js, sourcemap: data:application/json;charset=utf-8,%7B%22version%22:3,%22sources%22:%5B%22/Users/user/Development/vscode-issue/index.js%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAAA;AACA;AACA%22%7D\r\nSyntaxError: Unexpected token � in JSON at position 0\r\n    at JSON.parse (<anonymous>)\r\n    at new SourceMap (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/sourceMaps/sourceMap.js:20:25)\r\n    at sourceMapContentsP.then.contents (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/sourceMaps/sourceMapFactory.js:53:28)\r\n    at <anonymous>\r\n```\r\n\r\n<!-- Launch with `code --disable-extensions` to check. -->\r\nReproduces without extensions: Yes\r\n\r\nIt seems vscode debugger always assumes the inline sourcemap data URI is in base64 encoding (even if the `;base64` extension is not included in the data URI scheme).\r\n\r\nThis will lead to data decoding error. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/405999437","html_url":"https://github.com/Microsoft/vscode/issues/35978#issuecomment-405999437","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/35978","id":405999437,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTk5OTQzNw==","user":{"login":"jdalton","id":4303,"node_id":"MDQ6VXNlcjQzMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4303?v=4","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T16:48:30Z","updated_at":"2018-07-18T16:48:30Z","author_association":"MEMBER","body":"I'll prep a PR to patch [getInlineSourceMapContents()](https://github.com/Microsoft/vscode-chrome-debug-core/blob/9d2d033134fcf46426c27dce5759cc0fba940c9d/src/sourceMaps/sourceMapFactory.ts#L65-L81) with support for utf-8 encoded source mapping urls."}}
{"actor":{"display_login":"jdalton"}}