File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -201,16 +201,22 @@ export function activate(context: vscode.ExtensionContext) {
201201
202202 context . subscriptions . push (
203203 vscode . commands . registerCommand ( 'extension.php-debug.pauseXdebugControlSocket' , async ( ) => {
204- // check compat
205204 const controlSocket = new ControlSocket ( )
206- const sockets = await controlSocket . listControlSockets ( )
205+ const sockets = await vscode . window . withProgress (
206+ {
207+ location : vscode . ProgressLocation . Window ,
208+ title : 'Loading PHP processes...' ,
209+ } ,
210+ async progress => {
211+ progress . report ( { increment : 0 } )
207212
208- // loading indicator
209- if ( sockets . length == 0 ) {
210- await vscode . window . showInformationMessage ( 'No Xdebug control sockets found...' )
211- return
212- }
213+ const sockets = await controlSocket . listControlSockets ( )
214+
215+ progress . report ( { increment : 100 } )
213216
217+ return sockets
218+ }
219+ )
214220 const qpi = sockets . map < vscode . QuickPickItem > (
215221 v =>
216222 < vscode . QuickPickItem > {
@@ -219,7 +225,7 @@ export function activate(context: vscode.ExtensionContext) {
219225 detail : v . ps ? v . ps . fileUri : '' ,
220226 }
221227 )
222- const i = await vscode . window . showQuickPick ( qpi , { canPickMany : false } )
228+ const i = await vscode . window . showQuickPick ( qpi , { canPickMany : false , title : 'Select a PHP process...' } )
223229 if ( i ) {
224230 await controlSocket . requestPause ( i . label )
225231 }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { ControlSocket } from '../controlSocket'
33import { assert } from 'chai'
44
55describe ( 'ControlSocket' , ( ) => {
6- it ( 'should try to get list of sockets' , async ( ) => {
6+ ; ( process . platform === 'darwin' ? it . skip : it ) ( 'should try to get list of sockets' , async ( ) => {
77 const cs = new ControlSocket ( )
88 const r = await cs . listControlSockets ( )
99 assert . isArray ( r )
You can’t perform that action at this time.
0 commit comments