Looking for some help debugging a basic Hello World TypeScript file. Whenever I try to set a breakpoint, it seems like VS Code is having trouble locating the source map, even though it's saved in the same directory. I'm using Chrome as my browser for this project and here's a snippet from my launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch with Chrome",
"type": "chrome",
"request": "launch",
"sourceMaps": true,
"file": "${workspaceRoot}/HelloWorld.ts"
}
]
}
I've tried different methods like starting the debugging session first and then setting a breakpoint, along with making sure there are no other instances of Chrome running during the debug process.
Below you can see the contents of the map file:
{"version":3,"file":"HelloWorld.js","sourceRoot":"","sources":["HelloWorld.ts"],"names":[],"mappings":"AAAA;IACW,MAAM,CAAC,IAAI;QACd,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,CAAC,CAAC;IACb,CAAC;CACJ;AAED,OAAO,CAAC,IAAI,EAAE,CAAC"}
And lastly, the code from my HelloWorld.ts file:
class Startup {
public static main(): number {
console.log('Hello World');
return 0;
}
}
Startup.main();
I am currently at a loss for what else I could do to ensure that VS Code processes the map correctly.