debug: add comprehensive logging for terminal command flow
Phase 1 of systematic debugging: Gather evidence Added detailed logging to trace the complete command flow: - launchCommand: Shows when called, terminalId, command, WebSocket state - waitForTerminalReady: Shows waiting period and ready state - handleTerminalMessage: Shows all messages from backend with details - WebSocket message content logged before sending Also fixed duplicate 'ready' message (removed line 113-116). Now when user creates "Claude Code CLI" terminal, console will show: 1. launchCommand called with terminalId and command 2. Waiting for terminal ready 3. Ready message received (or timeout) 4. Command sent to WebSocket 5. All backend messages logged This will reveal exactly where the flow breaks. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -109,12 +109,6 @@ class TerminalService {
|
||||
|
||||
console.log(`[TerminalService] WebSocket connected for terminal ${terminalId}`);
|
||||
|
||||
// Send ready message to client to indicate PTY is ready for input
|
||||
ws.send(JSON.stringify({
|
||||
type: 'ready',
|
||||
terminalId: terminalId
|
||||
}));
|
||||
|
||||
// Handle incoming messages from client (user input)
|
||||
ws.on('message', (data) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user