File tree Expand file tree Collapse file tree
extensions/debug-server-ready Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6969 "additionalProperties" : false ,
7070 "markdownDescription" : " %debug.server.ready.serverReadyAction.description%" ,
7171 "default" : {
72- "action" : " openExternally"
72+ "action" : " debugWithEdge" ,
73+ "pattern" : " listening on port ([0-9]+)" ,
74+ "uriFormat" : " http://localhost:%s" ,
75+ "webRoot" : " ${workspaceFolder}"
7376 },
7477 "properties" : {
7578 "action" : {
7679 "type" : " string" ,
7780 "enum" : [
78- " debugWithChrome"
81+ " debugWithChrome" ,
82+ " debugWithEdge"
7983 ],
8084 "enumDescriptions" : [
8185 " %debug.server.ready.action.debugWithChrome.description%"
8286 ],
8387 "markdownDescription" : " %debug.server.ready.action.description%" ,
84- "default" : " openExternally "
88+ "default" : " debugWithEdge "
8589 },
8690 "pattern" : {
8791 "type" : " string" ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const WEB_ROOT = '${workspaceFolder}';
1616
1717interface ServerReadyAction {
1818 pattern : string ;
19- action ?: 'openExternally' | 'debugWithChrome' | 'startDebugging' ;
19+ action ?: 'openExternally' | 'debugWithChrome' | 'debugWithEdge' | ' startDebugging';
2020 uriFormat ?: string ;
2121 webRoot ?: string ;
2222 name ?: string ;
@@ -147,13 +147,11 @@ class ServerReadyDetector extends vscode.Disposable {
147147 break ;
148148
149149 case 'debugWithChrome' :
150- vscode . debug . startDebugging ( session . workspaceFolder , {
151- type : 'pwa-chrome' ,
152- name : 'Chrome Debug' ,
153- request : 'launch' ,
154- url : uri ,
155- webRoot : args . webRoot || WEB_ROOT
156- } ) ;
150+ this . debugWithBrowser ( 'pwa-chrome' , session , uri ) ;
151+ break ;
152+
153+ case 'debugWithEdge' :
154+ this . debugWithBrowser ( 'pwa-msedge' , session , uri ) ;
157155 break ;
158156
159157 case 'startDebugging' :
@@ -165,6 +163,16 @@ class ServerReadyDetector extends vscode.Disposable {
165163 break ;
166164 }
167165 }
166+
167+ private debugWithBrowser ( type : string , session : vscode . DebugSession , uri : string ) {
168+ return vscode . debug . startDebugging ( session . workspaceFolder , {
169+ type,
170+ name : 'Browser Debug' ,
171+ request : 'launch' ,
172+ url : uri ,
173+ webRoot : session . configuration . serverReadyAction . webRoot || WEB_ROOT
174+ } ) ;
175+ }
168176}
169177
170178export function activate ( context : vscode . ExtensionContext ) {
You can’t perform that action at this time.
0 commit comments