LoginSignup
0

More than 5 years have passed since last update.

Visual Studio CodeでTypeScriptデバッグ

Posted at

学習用メモです。 

Visual Studio CodeでTypeScriptをデバッグする流れ

PowerShell
PS C:\Users\Taro\Desktop> mkdir ws


    ディレクトリ: C:\Users\Taro\Desktop


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2018/05/09     11:10                ws


PS C:\Users\Taro\Desktop> cd ws
PS C:\Users\Taro\Desktop\ws> tsc --init
message TS6071: Successfully created a tsconfig.json file.
PS C:\Users\Taro\Desktop\ws> code .

tsconfig.json で、"sourceMap": true, のところコメントアウト

次のファイル作成

index.ts
console.log("hello TypeScript")

以下、Visual Studio Codeで
1. タスク > 既定のビルドタスクの構成 > tsc:ビルド
2. タスク > ビルド タスクの実行 
3. デバッグ > デバッグの開始 (F5)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0