debug: add detailed spawn attempt and error logging
- Log spawn attempt before calling spawn() - Add detailed error logging with stack trace - This will help identify if spawn is failing silently
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -58,6 +58,8 @@ class TerminalService {
|
||||
const terminalId = `term-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
||||
|
||||
try {
|
||||
console.log(`[TerminalService] Attempting to spawn PTY with shell: ${shell}, cwd: ${workingDir}`);
|
||||
|
||||
// Spawn PTY process
|
||||
const pty = spawn(shell, [], {
|
||||
name: 'xterm-color',
|
||||
@@ -91,6 +93,9 @@ class TerminalService {
|
||||
return { success: true, terminalId, terminal };
|
||||
} catch (error) {
|
||||
console.error(`[TerminalService] Failed to create terminal:`, error);
|
||||
console.error(`[TerminalService] Error stack:`, error.stack);
|
||||
console.error(`[TerminalService] Error name:`, error.name);
|
||||
console.error(`[TerminalService] Error message:`, error.message);
|
||||
return { success: false, error: error.message };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user