дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(run): debug Python on Docker and Compose run targets (#1757)
Refs #1083 (step A2). Debug now works on Python configurations whose run target is a Docker image or Compose service: the run starts the program in a new container under debugpy (the image's own, else the IDE's managed copy mounted read-only), publishes the debug port on 127.0.0.1 only, and the debugger attaches like a Python Remote Debug configuration with the project folder mapped. Console scripts (pytest) run as modules and `uv run` keeps the manager in front; shell command lines are refused. Container debug startup is bounded (error when the container exits early or debugpy isn't ready in 120 s) and stopping the debugger stops the container. Co-authored-by: andreabasile <[email protected]>
Цей коміт міститься в:
1 джерело
c3671d782c
коміт
daad91777f
23 files changed
+904
-34
No files matched your search
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* The HTTP port of a running Spring Boot application, from the embedded web
|
||||
* server's startup line: "Tomcat started on port 8080 (http) with context path '/'",
|
||||
* "Netty started on port 8080", "Undertow started on port(s) 8080 (http)",
|
||||
* "Jetty started on port(s) 8080 (http/1.1)".
|
||||
*/
|
||||
const STARTED = /\b(?:Tomcat|Netty|Undertow|Jetty)\b.*?\bstarted on port(?:\(s\))?:?\s*(\d{1,5})/i;
|
||||
|
||||
export function startedPort(line: string): number | null {
|
||||
if (!line.includes("tarted on port")) return null;
|
||||
const m = STARTED.exec(line);
|
||||
if (!m) return null;
|
||||
const port = Number(m[1]);
|
||||
return port > 0 && port < 65536 ? port : null;
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача