Project breaks TypeScript debugging with VSCode + Chrome + webpack #237

Closed
opened 2025-08-09 17:15:31 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @k-vekos on 1/9/2018

I am getting this error message when launching chrome for debugging in VSCode while building + running from VS2017:

SourceMaps.loadSourceMapContents: Could not download sourcemap from http://localhost:10928/dist/tryCatch.js.map
SourceMaps.getMapForGeneratedPath: exception while processing path: http://localhost:10928/dist/vendor.js?v=RCvRrqPvM2Kc5BlkEQ045FeXR6gPMRIwfn51ludN14I, sourcemap: tryCatch.js.map
SyntaxError: Unexpected token v in JSON at position 0
    at JSON.parse (<anonymous>)
    at new SourceMap (C:\Users\xxx\.vscode\extensions\msjsdiag.debugger-for-chrome-3.5.0\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMap.js:20:25)
    at sourceMapContentsP.then.contents (C:\Users\xxx\.vscode\extensions\msjsdiag.debugger-for-chrome-3.5.0\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapFactory.js:53:28)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:109:7)

Here is my source code, it is simply using the starter template when you create a new Angular 2, .NET Core project from VS2017:

VSCodeDebugError.zip

Here's my repro steps:

  1. Open and run the application in VS2017 in Debug mode on Any CPU and config "VSCodeDebugError".
  2. Open VSCode and edit launch.json to have the correct URL and port # for debugging.
  3. Run debugging in VSCode.
  4. Once the page launches check the VSCode console for the below error message:

I am cross-posting from this issue since I am not sure which aspect is causing the defect: https://github.com/Microsoft/vscode/issues/39797

*Originally created by @k-vekos on 1/9/2018* I am getting this error message when launching chrome for debugging in VSCode while building + running from VS2017: ``` SourceMaps.loadSourceMapContents: Could not download sourcemap from http://localhost:10928/dist/tryCatch.js.map SourceMaps.getMapForGeneratedPath: exception while processing path: http://localhost:10928/dist/vendor.js?v=RCvRrqPvM2Kc5BlkEQ045FeXR6gPMRIwfn51ludN14I, sourcemap: tryCatch.js.map SyntaxError: Unexpected token v in JSON at position 0 at JSON.parse (<anonymous>) at new SourceMap (C:\Users\xxx\.vscode\extensions\msjsdiag.debugger-for-chrome-3.5.0\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMap.js:20:25) at sourceMapContentsP.then.contents (C:\Users\xxx\.vscode\extensions\msjsdiag.debugger-for-chrome-3.5.0\node_modules\vscode-chrome-debug-core\out\src\sourceMaps\sourceMapFactory.js:53:28) at <anonymous> at process._tickCallback (internal/process/next_tick.js:109:7) ``` Here is my source code, it is simply using the starter template when you create a new Angular 2, .NET Core project from VS2017: [VSCodeDebugError.zip](https://github.com/Microsoft/vscode/files/1549155/VSCodeDebugError.zip) Here's my repro steps: 1. Open and run the application in VS2017 in Debug mode on Any CPU and config "VSCodeDebugError". 2. Open VSCode and edit `launch.json` to have the correct URL and port # for debugging. 3. Run debugging in VSCode. 4. Once the page launches check the VSCode console for the below error message: I am cross-posting from this issue since I am not sure which aspect is causing the defect: https://github.com/Microsoft/vscode/issues/39797
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#237
No description provided.