How to use the vscode-debugadapter.DebugSession.run function in vscode-debugadapter

To help you get started, we’ve selected a few vscode-debugadapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SqrTT / prophet / src / mockDebug.ts View on Github external
const e = new OutputEvent(`${err}\n ${err.stack}`);
		//(e).body.variablesReference = this._variableHandles.create("args");
		this.sendEvent(e);	// print current line on debug console
	}
	private logError(err) {
		const e = new OutputEvent(err, 'stderr');
		this.sendEvent(e);	// print current line on debug console
	}

	private log(msg: string, line?: number) {
		const e = new OutputEvent(`${msg}\n`);
		this.sendEvent(e);	// print current line on debug console
	}
}

DebugSession.run(ProphetDebugSession);
github facebook / prepack / src / debugger / adapter / DebugAdapter.js View on Github external
}

  _ensureAdapterChannelCreated(callingRequest: string) {
    // All responses that involve the Adapter Channel should only be invoked
    // after the channel has been created. If this ordering is perturbed,
    // there was likely a change in the protocol implementation by Nuclide.
    if (this._adapterChannel === undefined) {
      throw new DebuggerError(
        "Startup Error",
        `Adapter Channel in Debugger is being used before it has been created. Caused by ${callingRequest}.`
      );
    }
  }
}

DebugSession.run(PrepackDebugSession);
github bazelbuild / vscode-bazel / src / debug-adapter / client.ts View on Github external
* pretty-printed objects.
   */
  private debugLog(message: string, ...objects: object[]) {
    this.sendEvent(new OutputEvent(message, "console"));
    for (const object of objects) {
      const s = JSON.stringify(object, undefined, 2);
      if (s) {
        this.sendEvent(new OutputEvent(`\n${s}`, "console"));
      }
    }
    this.sendEvent(new OutputEvent("\n", "console"));
  }
}

// Start the debugging session.
DebugSession.run(BazelDebugSession);
github Dart-Code / Dart-Code / src / extension / debug / dart_test_debug_entry.ts View on Github external
import { DebugSession } from "vscode-debugadapter";
import { DartTestDebugSession } from "./dart_test_debug_impl";

DebugSession.run(DartTestDebugSession);
github Dart-Code / Dart-Code / src / extension / debug / flutter_test_debug_entry.ts View on Github external
import { DebugSession } from "vscode-debugadapter";
import { FlutterTestDebugSession } from "./flutter_test_debug_impl";

DebugSession.run(FlutterTestDebugSession);
github hsu2017 / luaide-lite / src / debugger / LuaDebug.ts View on Github external
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
		}
		if (/(E+)/.test(fmt)) {
			fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? "/u661f/u671f" : "/u5468") : "") + week[date.getDay() + ""]);
		}
		for (let k in o) {
			if (new RegExp("(" + k + ")").test(fmt)) {
				fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
			}
		}
		return fmt
	}

}

DebugSession.run(LuaDebug)
github Dart-Code / Dart-Code / src / debug / flutter_debug_entry.ts View on Github external
import { DebugSession } from "vscode-debugadapter";
import { FlutterDebugSession } from "./flutter_debug_impl";

DebugSession.run(FlutterDebugSession);
github SkaceKamen / vscode-sqflint / debugger / src / adapter.ts View on Github external
msg.body.source = {
						name: path.basename(error.filename),
						path: error.filename
					}
					msg.body.line = error.line
				}

				this.sendEvent(msg);
			}
		});

		this.sendResponse(response);
	}
}

DebugSession.run(SQFDebug);
github Dart-Code / Dart-Code / src / debug / web_debug_entry.ts View on Github external
import { DebugSession } from "vscode-debugadapter";
import { WebDebugSession } from "./web_debug_impl";

DebugSession.run(WebDebugSession);
github forcedotcom / salesforcedx-vscode / packages / salesforcedx-apex-debugger / src / adapter / apexDebug.ts View on Github external
type: VscodeDebuggerMessageType.Warning,
          message: message.sobject.Description
        } as VscodeDebuggerMessage)
      );
    }
  }

  public toCommaSeparatedString(arg?: string[]): string {
    if (arg && arg.length > 0) {
      return Array.from(new Set(arg)).join(',');
    }
    return '';
  }
}

DebugSession.run(ApexDebug);