Skip to content

Commit

Permalink
Build and run generator seperately in vscode debug settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancheung committed Apr 14, 2024
1 parent 69ed029 commit 560b9b5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": "Launch Generator (console)",
"name": "Launch Code Generator (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"preLaunchTask": "buildGenerator",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/FreeTypeSharp.Generator/bin/Debug/net8.0/FreeTypeSharp.Generator.dll",
"args": [
Expand Down
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,17 @@
],
"problemMatcher": "$msCompile"
},
{
"label": "buildGenerator",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/FreeTypeSharp.Generator/FreeTypeSharp.Generator.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
]
}
2 changes: 2 additions & 0 deletions FreeTypeSharp.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ public static int Main(string[] args)
fileWriter.Write(rootSyntax.NormalizeWhitespace().ToFullString());
}

System.Console.WriteLine("All done, code are saved to {0}", OutputDir);

return 0;
}

Expand Down

0 comments on commit 560b9b5

Please sign in to comment.