File tree 1 file changed +15
-4
lines changed
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -274,12 +274,23 @@ def recv_request
274
274
retry
275
275
end
276
276
277
- def load_rdbgExtension req
278
- if exts = req . dig ( 'arguments' , 'rdbgExtension ' )
277
+ def load_extensions req
278
+ if exts = req . dig ( 'arguments' , 'rdbgExtensions ' )
279
279
exts . each { |ext |
280
280
require_relative "dap_custom/#{ File . basename ( ext ) } "
281
281
}
282
282
end
283
+
284
+ if scripts = req . dig ( 'arguments' , 'rdbgInitialScripts' )
285
+ scripts . each do |script |
286
+ begin
287
+ eval ( script )
288
+ rescue Exception => e
289
+ puts e . message
290
+ puts e . backtrace . inspect
291
+ end
292
+ end
293
+ end
283
294
end
284
295
285
296
def process
@@ -303,7 +314,7 @@ def process_request req
303
314
UI_DAP . local_fs_map_set req . dig ( 'arguments' , 'localfs' ) || req . dig ( 'arguments' , 'localfsMap' ) || true
304
315
@nonstop = true
305
316
306
- load_rdbgExtension req
317
+ load_extensions req
307
318
308
319
when 'attach'
309
320
send_response req
@@ -315,7 +326,7 @@ def process_request req
315
326
@nonstop = false
316
327
end
317
328
318
- load_rdbgExtension req
329
+ load_extensions req
319
330
320
331
when 'configurationDone'
321
332
send_response req
You can’t perform that action at this time.
0 commit comments