I've installed newest Version of VS Code and I try to compile a "app.ts" file so that I get a "app.js" and "app.js.map". But when I compile the project it only creates the "app.js" file and no mapping file.
in my root folder I've a ".vscode" folder with the following "tsconfig.json"
{ "compilerOptions": { "target": "es6", "module": "amd", "sourceMap": true } and the following the "tasks.json" file
{ "version": "0.1.0", // The command is tsc. Assumes that tsc has been installed using npm install -g typescript "command": "tsc", // The command is a shell script "isShellCommand": true, // Show the output window only if unrecognized errors occur. "showOutput": "silent", // args is the HelloWorld program to compile. "args": ["app.ts"], // use the standard tsc problem matcher to find compile problems // in the output. "problemMatcher": "$tsc" } } and in the root directory I've my "app.ts" file
module App { export class Person { constructor(public name: string) { } public log(showLog: boolean): void { if (showLog) { console.log("Der Name des Nutzers ist: " + this.name) } } } } var person = new App.Person("Hallo Welt"); person.log(true); but when I compile it with ctrl+shift+b it only creates the app.js file and no mapping.
Update: I've also tried to modify the "tasks.json"
{ "version": "0.1.0", // The command is tsc. Assumes that tsc has been installed using npm install -g typescript "command": "tsc", // The command is a shell script "isShellCommand": true, // Show the output window only if unrecognized errors occur. "showOutput": "always", // args is the HelloWorld program to compile. "args": [" --sourcemap app.ts"], // use the standard tsc problem matcher to find compile problems // in the output. "problemMatcher": "$tsc" } with --sourcemap Argument but it doesn't work. But when I use the command promt with the following command:
c:\Temp\vsCode\tsc --sourcemap app.ts then everything works fine and the mapping files are created.