From 93a826f4b3d39aa813f591c7e2be6431ff4618ee Mon Sep 17 00:00:00 2001 From: Etienne van Delden de la Haije Date: Fri, 19 Apr 2024 15:27:57 +0200 Subject: [PATCH 1/2] Add error messages to Debug Console when rdbg exits --- Scripts/helpers.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Scripts/helpers.js b/Scripts/helpers.js index e635c71..93177d7 100644 --- a/Scripts/helpers.js +++ b/Scripts/helpers.js @@ -19,7 +19,10 @@ exports.resolveRdbgPath = async function() { }) process.onDidExit((status) => { - if (status == 1) reject(err) + if (status == 1) { + console.error("An error occured while determining `rdbg` path.") + reject(err) + } str = str.trim() if (str.length == 0 || str == "rdbg not found") { @@ -54,7 +57,10 @@ exports.resolveRubyDebugSocketPath = async function() { }) process.onDidExit((status) => { - if (status == 1) reject(err) + if (status == 1) { + console.error("An error occured while determining open rdbg sockets.") + reject(err) + } str = str.trim() if (str.length == 0) { @@ -92,7 +98,10 @@ exports.generateRubyDebugSocketPath = async function() { }) process.onDidExit((status) => { - if (status == 1) reject(err) + if (status == 1) { + console.error("An error occured whyle generating rdbg socket.") + reject(err) + } str = str.trim() if (str.length == 0) { From 1c10c93cefa47375c9c4fcaca9dcf059f18d519e Mon Sep 17 00:00:00 2001 From: Etienne van Delden de la Haije Date: Fri, 19 Apr 2024 15:30:43 +0200 Subject: [PATCH 2/2] Fix #6 rdbg not listing sockets, by disabling running as shell --- Scripts/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/helpers.js b/Scripts/helpers.js index 93177d7..01b80ae 100644 --- a/Scripts/helpers.js +++ b/Scripts/helpers.js @@ -42,7 +42,7 @@ exports.resolveRubyDebugSocketPath = async function() { cwd: nova.workspace.path, args: ["rdbg", "--util=list-socks"], stdio: ["ignore", "pipe", "pipe"], - shell: true + shell: false }) let str = ""