Versió 1.0.0
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
adapter/node_modules/*
|
||||
*.vsix
|
||||
8
.vscodeignore
Normal file
8
.vscodeignore
Normal file
@@ -0,0 +1,8 @@
|
||||
.vscode/
|
||||
.git/
|
||||
.gitignore
|
||||
adapter/node_modules/
|
||||
adapter/package-lock.json
|
||||
adapter/package.json
|
||||
**/*.map
|
||||
**/*.ts
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 JailGames
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -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",
|
||||
|
||||
@@ -3,7 +3,7 @@ const path = require('path');
|
||||
|
||||
function activate(context) {
|
||||
const factory = {
|
||||
createDebugAdapterDescriptor(session, executable) {
|
||||
createDebugAdapterDescriptor(session) {
|
||||
const command = "node";
|
||||
const args = [path.join(__dirname, "adapter", "debugAdapter.js")];
|
||||
|
||||
@@ -12,7 +12,7 @@ function activate(context) {
|
||||
};
|
||||
|
||||
const registration = vscode.debug.registerDebugAdapterDescriptorFactory(
|
||||
"myLuaApp",
|
||||
"mini-debugger",
|
||||
factory
|
||||
);
|
||||
|
||||
|
||||
22
package.json
22
package.json
@@ -2,13 +2,17 @@
|
||||
"name": "mini-debugger",
|
||||
"displayName": "Mini Debugger",
|
||||
"description": "Debug Lua inside my C/C++ application",
|
||||
"version": "0.0.1",
|
||||
"publisher": "raimon",
|
||||
"version": "1.0.0",
|
||||
"publisher": "JailGames",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitea.sustancia.synology.me/JailDoctor/mini-debugger"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.85.0"
|
||||
},
|
||||
"categories": ["Debuggers"],
|
||||
"activationEvents": ["onDebug"],
|
||||
"activationEvents": ["onDebug:mini-debugger"],
|
||||
"main": "./extension.js",
|
||||
"contributes": {
|
||||
"breakpoints": [
|
||||
@@ -16,18 +20,16 @@
|
||||
],
|
||||
"debuggers": [
|
||||
{
|
||||
"type": "myLuaApp",
|
||||
"label": "Debug My Lua App",
|
||||
"program": "./adapter/debugAdapter.js",
|
||||
"type": "mini-debugger",
|
||||
"label": "Debugger for mini games",
|
||||
"runtime": "node",
|
||||
"languages": ["lua"],
|
||||
"request": "launch",
|
||||
"initialConfigurations": [
|
||||
{
|
||||
"type": "myLuaApp",
|
||||
"type": "mini-debugger",
|
||||
"request": "launch",
|
||||
"name": "Debug My Lua App",
|
||||
"program": "${workspaceFolder}/miapp"
|
||||
"name": "Debugger for mini games",
|
||||
"program": "${workspaceFolder}/mini_debug"
|
||||
}
|
||||
],
|
||||
"configurationAttributes": {
|
||||
|
||||
Reference in New Issue
Block a user