File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
src/CADL.Extension/Emitter.Csharp/src Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -171,11 +171,14 @@ export async function $onEmit(context: EmitContext<NetEmitterOptions>) {
171171 const newProjectOption = options [ "new-project" ]
172172 ? "--new-project"
173173 : "" ;
174+
175+ const debugFlag = options . debug ?? false ? " --debug" : "" ;
176+
174177 const command = `dotnet --roll-forward Major ${ resolvePath (
175178 options . csharpGeneratorPath
176179 ) } --project-path ${ outputFolder } ${ newProjectOption } --clear-output-folder ${
177180 options [ "clear-output-folder" ]
178- } `;
181+ } ${ debugFlag } `;
179182 console . info ( command ) ;
180183
181184 try {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export type NetEmitterOptions = {
1818 "clear-output-folder" ?: boolean ;
1919 "save-inputs" ?: boolean ;
2020 "model-namespace" ?: boolean ;
21+ debug ?: boolean ;
2122} & DpgEmitterOptions ;
2223
2324export const NetEmitterOptionsSchema : JSONSchemaType < NetEmitterOptions > = {
@@ -46,7 +47,8 @@ export const NetEmitterOptionsSchema: JSONSchemaType<NetEmitterOptions> = {
4647 "model-namespace" : { type : "boolean" , nullable : true } ,
4748 "generate-protocol-methods" : { type : "boolean" , nullable : true } ,
4849 "generate-convenience-methods" : { type : "boolean" , nullable : true } ,
49- "package-name" : { type : "string" , nullable : true }
50+ "package-name" : { type : "string" , nullable : true } ,
51+ debug : { type : "boolean" , nullable : true }
5052 } ,
5153 required : [ ]
5254} ;
@@ -61,7 +63,8 @@ const defaultOptions = {
6163 "save-inputs" : false ,
6264 "generate-protocol-methods" : true ,
6365 "generate-convenience-methods" : true ,
64- "package-name" : undefined
66+ "package-name" : undefined ,
67+ debug : undefined
6568} ;
6669
6770export function resolveOptions ( context : EmitContext < NetEmitterOptions > ) {
You can’t perform that action at this time.
0 commit comments