Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c8f9394614 |
@@ -1,8 +1,5 @@
|
||||
.vscode/
|
||||
.git/
|
||||
.gitignore
|
||||
adapter/node_modules/
|
||||
adapter/package-lock.json
|
||||
adapter/package.json
|
||||
**/*.map
|
||||
**/*.ts
|
||||
|
||||
@@ -20,6 +20,7 @@ constructor() {
|
||||
// Redirigir console.log a la Debug Console
|
||||
//console.log = (...args) => { this.sendEvent(new OutputEvent(args.join(" ") + "\n")); };
|
||||
console.log("Debug Adapter iniciado");
|
||||
|
||||
this._stackFrames = [];
|
||||
this.setDebuggerLinesStartAt1(true);
|
||||
this.setDebuggerColumnsStartAt1(true);
|
||||
@@ -263,7 +264,7 @@ constructor() {
|
||||
console.log("[ADAPTER] launchRequest");
|
||||
|
||||
const program = args.program;
|
||||
const cwd = args.cwd || process.cwd();
|
||||
const cwd = args.cwd || args.workspaceFolder || process.cwd();
|
||||
|
||||
this.process = spawn(program, [], {
|
||||
cwd: cwd,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mini-adapter",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.10",
|
||||
"main": "debugAdapter.js",
|
||||
"dependencies": {
|
||||
"vscode-debugadapter": "^1.51.0",
|
||||
|
||||
11
extension.js
11
extension.js
@@ -2,6 +2,7 @@ const vscode = require('vscode');
|
||||
const path = require('path');
|
||||
|
||||
function activate(context) {
|
||||
|
||||
const factory = {
|
||||
createDebugAdapterDescriptor(session) {
|
||||
const command = "node";
|
||||
@@ -11,12 +12,12 @@ function activate(context) {
|
||||
}
|
||||
};
|
||||
|
||||
const registration = vscode.debug.registerDebugAdapterDescriptorFactory(
|
||||
"mini-debugger",
|
||||
factory
|
||||
context.subscriptions.push(
|
||||
vscode.debug.registerDebugAdapterDescriptorFactory(
|
||||
"mini-debugger",
|
||||
factory
|
||||
)
|
||||
);
|
||||
|
||||
context.subscriptions.push(registration);
|
||||
}
|
||||
|
||||
function deactivate() {}
|
||||
|
||||
15
package.json
15
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "mini-debugger",
|
||||
"displayName": "Mini Debugger",
|
||||
"description": "Debug Lua inside my C/C++ application",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.10",
|
||||
"publisher": "JailGames",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -12,7 +12,10 @@
|
||||
"vscode": "^1.85.0"
|
||||
},
|
||||
"categories": ["Debuggers"],
|
||||
"activationEvents": ["onDebug:mini-debugger"],
|
||||
"activationEvents": [
|
||||
"onDebug",
|
||||
"onCommand:mini-debugger.adapterExecutable"
|
||||
],
|
||||
"main": "./extension.js",
|
||||
"contributes": {
|
||||
"breakpoints": [
|
||||
@@ -22,14 +25,14 @@
|
||||
{
|
||||
"type": "mini-debugger",
|
||||
"label": "Debugger for mini games",
|
||||
"runtime": "node",
|
||||
"languages": ["lua"],
|
||||
"initialConfigurations": [
|
||||
{
|
||||
"type": "mini-debugger",
|
||||
"request": "launch",
|
||||
"name": "Debugger for mini games",
|
||||
"program": "${workspaceFolder}/mini_debug"
|
||||
"program": "${workspaceFolder}/mini_debug",
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
],
|
||||
"configurationAttributes": {
|
||||
@@ -38,6 +41,10 @@
|
||||
"program": {
|
||||
"type": "string",
|
||||
"description": "Ruta a tu aplicación C/C++"
|
||||
},
|
||||
"cwd": {
|
||||
"type": "string",
|
||||
"description": "Directorio de trabajo del programa"
|
||||
}
|
||||
},
|
||||
"required": ["program"]
|
||||
|
||||
Reference in New Issue
Block a user