File tree Expand file tree Collapse file tree 3 files changed +9
-21
lines changed
Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 8787 "type" : " nativescript" ,
8888 "platform" : " ios" ,
8989 "request" : " launch" ,
90- "appRoot" : " . " ,
90+ "appRoot" : " ${workspaceRoot} " ,
9191 "sourceMaps" : true ,
9292 "diagnosticLogging" : false ,
9393 "emulator" : false
9797 "type" : " nativescript" ,
9898 "platform" : " ios" ,
9999 "request" : " attach" ,
100- "appRoot" : " . " ,
100+ "appRoot" : " ${workspaceRoot} " ,
101101 "sourceMaps" : true ,
102102 "diagnosticLogging" : false ,
103103 "emulator" : false
107107 "type" : " nativescript" ,
108108 "platform" : " ios" ,
109109 "request" : " launch" ,
110- "appRoot" : " . " ,
110+ "appRoot" : " ${workspaceRoot} " ,
111111 "sourceMaps" : true ,
112112 "diagnosticLogging" : false ,
113113 "emulator" : true
117117 "type" : " nativescript" ,
118118 "platform" : " ios" ,
119119 "request" : " attach" ,
120- "appRoot" : " . " ,
120+ "appRoot" : " ${workspaceRoot} " ,
121121 "sourceMaps" : true ,
122122 "diagnosticLogging" : false ,
123123 "emulator" : true
127127 "type" : " nativescript" ,
128128 "platform" : " android" ,
129129 "request" : " launch" ,
130- "appRoot" : " . " ,
130+ "appRoot" : " ${workspaceRoot} " ,
131131 "sourceMaps" : true ,
132132 "diagnosticLogging" : false ,
133133 "emulator" : false
137137 "type" : " nativescript" ,
138138 "platform" : " android" ,
139139 "request" : " launch" ,
140- "appRoot" : " . " ,
140+ "appRoot" : " ${workspaceRoot} " ,
141141 "sourceMaps" : true ,
142142 "diagnosticLogging" : false ,
143143 "emulator" : true
147147 "type" : " nativescript" ,
148148 "platform" : " android" ,
149149 "request" : " attach" ,
150- "appRoot" : " . " ,
150+ "appRoot" : " ${workspaceRoot} " ,
151151 "sourceMaps" : false ,
152152 "diagnosticLogging" : false ,
153153 "emulator" : false
157157 "type" : " nativescript" ,
158158 "platform" : " android" ,
159159 "request" : " attach" ,
160- "appRoot" : " . " ,
160+ "appRoot" : " ${workspaceRoot} " ,
161161 "sourceMaps" : false ,
162162 "diagnosticLogging" : false ,
163163 "emulator" : true
Original file line number Diff line number Diff line change @@ -399,17 +399,7 @@ export function errP(msg: any): Promise<any> {
399399 * Calculates the appRoot from a launch/attach request. The appRoot is the root directory of the NativeScript app.
400400 */
401401export function getAppRoot ( args : ILaunchRequestArgs | IAttachRequestArgs ) : string {
402- let appRoot : string ;
403- if ( args . appRoot ) {
404- appRoot = args . appRoot ;
405- if ( ! path . isAbsolute ( appRoot ) ) {
406- appRoot = path . resolve ( args . cwd , appRoot ) ;
407- }
408- } else {
409- appRoot = args . cwd ;
410- }
411-
412- return appRoot ;
402+ return ( args . appRoot && path . isAbsolute ( args . appRoot ) ) ? args . appRoot : '' ;
413403}
414404
415405/**
Original file line number Diff line number Diff line change 11import { DebugProtocol } from 'vscode-debugprotocol' ;
22
33export interface ILaunchRequestArgs extends DebugProtocol . LaunchRequestArguments {
4- cwd : string ; /* Automatically set by VS Code to the currently opened folder */
54 platform : string ;
65 appRoot ?: string ;
76 runtimeArgs ?: string [ ] ;
@@ -15,7 +14,6 @@ export interface ILaunchRequestArgs extends DebugProtocol.LaunchRequestArguments
1514}
1615
1716export interface IAttachRequestArgs extends DebugProtocol . AttachRequestArguments {
18- cwd : string ; /* Automatically set by VS Code to the currently opened folder */
1917 platform : string ;
2018 appRoot ?: string ;
2119 sourceMaps ?: boolean ;
You can’t perform that action at this time.
0 commit comments