Versió 1.0.0
This commit is contained in:
@@ -12,13 +12,13 @@ const {
|
||||
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
class MyLuaDebugSession extends LoggingDebugSession {
|
||||
class MiniDebugSession extends LoggingDebugSession {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// Redirigir console.log a la Debug Console
|
||||
console.log = (...args) => { this.sendEvent(new OutputEvent(args.join(" ") + "\n")); };
|
||||
//console.log = (...args) => { this.sendEvent(new OutputEvent(args.join(" ") + "\n")); };
|
||||
console.log("Debug Adapter iniciado");
|
||||
this._stackFrames = [];
|
||||
this.setDebuggerLinesStartAt1(true);
|
||||
@@ -109,6 +109,9 @@ constructor() {
|
||||
}
|
||||
|
||||
if (json.type === "break") {
|
||||
this._lastStackFrames = null;
|
||||
this._lastTotalFrames = 0;
|
||||
|
||||
this.currentFile = json.file;
|
||||
this.currentLine = json.line;
|
||||
|
||||
@@ -116,11 +119,17 @@ constructor() {
|
||||
return;
|
||||
}
|
||||
if (json.type === "step") {
|
||||
this._lastStackFrames = null;
|
||||
this._lastTotalFrames = 0;
|
||||
|
||||
this.sendEvent(new StoppedEvent("step", 1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (json.type === "pause") {
|
||||
this._lastStackFrames = null;
|
||||
this._lastTotalFrames = 0;
|
||||
|
||||
this.sendEvent(new StoppedEvent("pause", 1));
|
||||
return;
|
||||
}
|
||||
@@ -623,4 +632,4 @@ constructor() {
|
||||
|
||||
}
|
||||
|
||||
new MyLuaDebugSession().start(process.stdin, process.stdout);
|
||||
new MiniDebugSession().start(process.stdin, process.stdout);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mini-adapter",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.0",
|
||||
"main": "debugAdapter.js",
|
||||
"dependencies": {
|
||||
"vscode-debugadapter": "^1.51.0",
|
||||
|
||||
Reference in New Issue
Block a user