@@ -61,33 +61,14 @@ async function startDevProxy(
6161async function startDevProxyWithOptions ( devProxyExe : string ) : Promise < void > {
6262 const args : string [ ] = [ ] ;
6363
64- // Config file
65- const configFiles = await vscode . workspace . findFiles (
66- '**/devproxyrc.{json,jsonc}' ,
67- '**/node_modules/**'
68- ) ;
69- const configItems : vscode . QuickPickItem [ ] = [
70- { label : '$(remove) None' , description : 'Use default configuration' } ,
71- ...configFiles . map ( f => ( {
72- label : vscode . workspace . asRelativePath ( f ) ,
73- description : f . fsPath ,
74- } ) ) ,
75- ] ;
76-
77- const selectedConfig = await vscode . window . showQuickPick ( configItems , {
78- title : 'Start with Options (1/13): Config file' ,
79- placeHolder : 'Select a config file' ,
80- } ) ;
81- if ( selectedConfig === undefined ) {
82- return ;
83- }
84- if ( selectedConfig . description && selectedConfig . description !== 'Use default configuration' ) {
85- args . push ( '--config-file' , `"${ selectedConfig . description } "` ) ;
64+ const configFilePath = getActiveConfigFilePath ( ) ;
65+ if ( configFilePath ) {
66+ args . push ( '--config-file' , `"${ configFilePath } "` ) ;
8667 }
8768
8869 // Port
8970 const port = await vscode . window . showInputBox ( {
90- title : 'Start with Options (2/13 ): Port' ,
71+ title : 'Start with Options (1/12 ): Port' ,
9172 prompt : 'Enter the proxy port number' ,
9273 value : '8000' ,
9374 validateInput : validatePortNumber ,
@@ -101,7 +82,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
10182
10283 // API port
10384 const apiPort = await vscode . window . showInputBox ( {
104- title : 'Start with Options (3/13 ): API port' ,
85+ title : 'Start with Options (2/12 ): API port' ,
10586 prompt : 'Enter the API port number' ,
10687 value : '8897' ,
10788 validateInput : validatePortNumber ,
@@ -115,7 +96,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
11596
11697 // IP address
11798 const ipAddress = await vscode . window . showInputBox ( {
118- title : 'Start with Options (4/13 ): IP address' ,
99+ title : 'Start with Options (3/12 ): IP address' ,
119100 prompt : 'Enter the IP address to listen on' ,
120101 value : '127.0.0.1' ,
121102 validateInput : validateIpAddress ,
@@ -134,7 +115,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
134115 { label : 'No' , description : 'Do not register as system proxy' } ,
135116 ] ,
136117 {
137- title : 'Start with Options (5/13 ): As system proxy' ,
118+ title : 'Start with Options (4/12 ): As system proxy' ,
138119 placeHolder : 'Register Dev Proxy as a system proxy?' ,
139120 }
140121 ) ;
@@ -152,7 +133,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
152133 { label : 'No' , description : 'Do not install certificate' } ,
153134 ] ,
154135 {
155- title : 'Start with Options (6/13 ): Install certificate' ,
136+ title : 'Start with Options (5/12 ): Install certificate' ,
156137 placeHolder : 'Install the root certificate?' ,
157138 }
158139 ) ;
@@ -167,7 +148,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
167148 const logLevel = await vscode . window . showQuickPick (
168149 [ 'trace' , 'debug' , 'information' , 'warning' , 'error' ] ,
169150 {
170- title : 'Start with Options (7/13 ): Log level' ,
151+ title : 'Start with Options (6/12 ): Log level' ,
171152 placeHolder : 'Select a log level' ,
172153 }
173154 ) ;
@@ -180,7 +161,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
180161
181162 // Failure rate
182163 const failureRate = await vscode . window . showInputBox ( {
183- title : 'Start with Options (8/13 ): Failure rate' ,
164+ title : 'Start with Options (7/12 ): Failure rate' ,
184165 prompt : 'Enter the failure rate (0-100)' ,
185166 value : '50' ,
186167 validateInput : validateFailureRate ,
@@ -194,7 +175,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
194175
195176 // URLs to watch
196177 const urlsToWatch = await vscode . window . showInputBox ( {
197- title : 'Start with Options (9/13 ): URLs to watch' ,
178+ title : 'Start with Options (8/12 ): URLs to watch' ,
198179 prompt : 'Enter URLs to watch (space separated). Leave empty to use config file values.' ,
199180 placeHolder : 'https://api.example.com/* https://graph.microsoft.com/v1.0/*' ,
200181 value : '' ,
@@ -213,7 +194,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
213194 { label : 'Yes' , description : 'Start recording immediately' } ,
214195 ] ,
215196 {
216- title : 'Start with Options (10/13 ): Record' ,
197+ title : 'Start with Options (9/12 ): Record' ,
217198 placeHolder : 'Start recording on launch?' ,
218199 }
219200 ) ;
@@ -231,7 +212,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
231212 { label : 'Yes' , description : 'Skip first run experience' } ,
232213 ] ,
233214 {
234- title : 'Start with Options (11/13 ): No first run' ,
215+ title : 'Start with Options (10/12 ): No first run' ,
235216 placeHolder : 'Skip the first run experience?' ,
236217 }
237218 ) ;
@@ -244,7 +225,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
244225
245226 // Timeout
246227 const timeout = await vscode . window . showInputBox ( {
247- title : 'Start with Options (12/13 ): Timeout' ,
228+ title : 'Start with Options (11/12 ): Timeout' ,
248229 prompt : 'Enter timeout in seconds. Leave empty for no timeout.' ,
249230 value : '' ,
250231 validateInput : validateTimeout ,
@@ -258,7 +239,7 @@ async function startDevProxyWithOptions(devProxyExe: string): Promise<void> {
258239
259240 // Watch PIDs
260241 const watchPids = await vscode . window . showInputBox ( {
261- title : 'Start with Options (13/13 ): Watch PIDs' ,
242+ title : 'Start with Options (12/12 ): Watch PIDs' ,
262243 prompt : 'Enter process IDs to watch (space separated). Leave empty to skip.' ,
263244 placeHolder : '1234 5678' ,
264245 value : '' ,
0 commit comments