MCPcopy Index your code
hub / github.com/Marus/cortex-debug / launchAttachInit

Method launchAttachInit

src/gdb.ts:336–362  ·  view source on GitHub ↗
(args: ConfigurationArguments)

Source from the content-addressed store, hash-verified

334 logger.setup(level, false, showTimes);
335 }
336 private launchAttachInit(args: ConfigurationArguments) {
337 // make sure to 'Stop' the buffered logging if 'trace' is not set
338 this.origShowDevDebugOutput = args.showDevDebugOutput;
339 this.setupLogger(true, args);
340 if (args.showDevDebugOutput === ADAPTER_DEBUG_MODE.VSCODE) {
341 args.showDevDebugOutput = ADAPTER_DEBUG_MODE.RAW;
342 }
343
344 this.args = this.normalizeArguments(args);
345 this.handleMsg('stdout',
346 `Cortex-Debug: VSCode debugger extension version ${args.pvtVersion} git(${__COMMIT_HASH__}). ` +
347 'Usage info: https://github.com/Marus/cortex-debug#usage');
348
349 if (this.origShowDevDebugOutput === ADAPTER_DEBUG_MODE.VSCODE) {
350 this.handleMsg('log', '"configuration": ' + JSON.stringify(args, undefined, 4) + '\n');
351 }
352
353 // When debugging this extension, we are in server mode serving multiple instances of a debugger.
354 // So make sure any old data is cleared, and we only rely on what the frontend tells us
355 TcpPortScanner.AvoidPorts.clear();
356 for (const p of args.pvtAvoidPorts || []) {
357 // Reserve it and neighboring ports
358 for (let count = 0; count < 4; count++) {
359 TcpPortScanner.AvoidPorts.add(p + count);
360 }
361 }
362 }
363
364 private dbgSymbolTable: SymbolTable = null;
365 private loadSymbols(): Promise<void> {

Callers 2

launchRequestMethod · 0.95
attachRequestMethod · 0.95

Calls 4

setupLoggerMethod · 0.95
normalizeArgumentsMethod · 0.95
handleMsgMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected