дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(debugger): finish PHP Remote Debug: taken port, waiting state, Port field (#1639)
A taken port now says which port is in use instead of Node's EADDRINUSE text; a listening PHP Remote Debug session shows "Listening for Xdebug on port N" instead of "Running…"; clearing the only field of a debug-only remote type keeps the form and shows the field as required; php-debug leaves the generic Debug adapter list until it has a launch template (#1623). Co-authored-by: DanielADK <[email protected]>
Цей коміт міститься в:
1 джерело
1f76e71621
коміт
b450f4028b
14 files changed
+292
-8
No files matched your search
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Why a debug session didn't start, as the user reads it. An adapter that listens for
|
||||
* the debuggee (php-debug waiting for Xdebug) fails with Node's
|
||||
* `listen EADDRINUSE: address already in use :::9003` when another IDE holds the port.
|
||||
*/
|
||||
import { tx } from "@/platform/i18n";
|
||||
|
||||
const PORT_IN_USE = /\bEADDRINUSE\b.*:(\d+)\s*$/;
|
||||
|
||||
export function startFailureMessage(e: unknown): string {
|
||||
const message = e instanceof Error ? e.message : String(e);
|
||||
const port = PORT_IN_USE.exec(message)?.[1];
|
||||
return port
|
||||
? tx`Port ${port} is already in use: another IDE or debug session may be listening on it. Stop it or choose another port.`
|
||||
: message;
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача