дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
fix(debugger): coloured Spring Boot output, Soft-Wrap and Scroll to End in the debug console (#1353)
Debugging a Spring Boot configuration showed its log uncoloured: Run adds -Dspring.output.ansi.enabled=always (Spring only colours output for a terminal, the process runs on pipes), the java-debug and Kotlin debug launches built their VM options without it. They now add the same console VM options as Run, unless the configuration sets the property itself. The debug console also gets the Run console's Soft-Wrap toggle (default from Settings › Console › Use soft wraps) and Scroll to End, which follows new output, turns off when scrolling up and on again at the end. Fixes #1262
Цей коміт міститься в:
1 джерело
2fc3535300
коміт
c83264ae75
4 files changed
+57
-7
No files matched your search
@@ -54,7 +54,7 @@ const { isJavaDebuggable, javaAttachConfig, javaLaunchConfig } = await import(".
|
||||
const app: RunConfig = {
|
||||
id: "application:a.Main",
|
||||
name: "Main",
|
||||
kind: "spring-boot",
|
||||
kind: "application",
|
||||
command: "java",
|
||||
args: ["-Xmx1g", "-cp", "${classpath}", "a.Main", "--port", "8081 x"],
|
||||
cwd: "api",
|
||||
@@ -93,6 +93,17 @@ describe("Java debugging (java-debug through jdtls)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("debugs Spring Boot with coloured console output, as Run does", async () => {
|
||||
const boot = { ...app, kind: "spring-boot" };
|
||||
expect(JSON.parse((await javaLaunchConfig(boot, "/p")).extraJson!).vmArgs).toBe(
|
||||
"-Dspring.output.ansi.enabled=always -Xmx1g",
|
||||
);
|
||||
const own = { ...boot, args: ["-Dspring.output.ansi.enabled=never", ...app.args] };
|
||||
expect(JSON.parse((await javaLaunchConfig(own, "/p")).extraJson!).vmArgs).toBe(
|
||||
"-Dspring.output.ansi.enabled=never -Xmx1g",
|
||||
);
|
||||
});
|
||||
|
||||
it("passes the configuration's VM options to java-debug's vmArgs, before the main class", async () => {
|
||||
const args = [
|
||||
"-Ddemo.flag=on",
|
||||
|
||||
Reference in new issue
Заблокувати користувача