i’m basically following this guide, while humbly attempting to trim down to bare necessity and re-align configs with crucial bits that’ve shifted since then… and likely to continue shifting 😐
- install Node… there’s many ways but their setup.exe is handy… this includes npm
- from cmd.exe:
npm install -g typescript
(-g means globally vs project specific) - install VS Code via setup.exe
- launch VS Code… commands inside VS Code designated as “vsc>” from here-on
- vsc> File > Open > New Folder > “projectFolder” > then Open that folder
- vsc> F1 > type “task” > “Configure Task Runner” > Enter > “TypeScript – Watch Mode” > Enter…
- this will create a crucial
tasks.json
file with working default settings… - -AND- that “watch mode” choice means the moment you save any .ts file, the IDE will automatically regen the corresponding .js files… which plays into live edit and continue style debugging
- this will create a crucial
-
vsc> File > New File > populate with the following json block and save as
tsconfig.json
… this directs vscode to “transpile” .ts script to standard .js for usjson { "compilerOptions": { "target": "es5", "outDir": "out/", "sourceMap": true } }
- vsc> File > New File > throw in something simple like
console.log("Hello World!");
and save asapp.ts
- vsc> build aka compile via CTRL+SHIFT+B… after a few pregnant seconds, this will gen some stuff in the
out
folder that we specified in abovetsconfig.json
- vsc> CTRL+SHIFT+D to get into Debug panel > click the gear icon which creates and opens default
launch.json
which should have working defaults going by what we’ve done previously - crucial and subtle, navigate back to the app.ts file as the active tab you wish to run/debug (this corresponds with the relative reference,
"program": "${file}"
, in launch.json) - now we should be able to simply hit F5 to run/debug from here-on as we’d normally expect… F9 to set breakpoints, etc.
hopefully you’re off to the races and you can bootstrap yourself further by googling
i am a bit “ashamed” this is still so obtuse