{"record":{"id":"037a6d8ee6e3614a","repo":"karatelabs/karate","slug":"karate-debug-port-is-set-but-karate-ide-jar-is-not-on-the","errorCode":null,"errorMessage":"karate.debug.port is set but karate-ide JAR is not on the classpath","messagePattern":"karate\\.debug\\.port is set but karate-ide JAR is not on the classpath","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"karate-core/src/main/java/io/karatelabs/core/Runner.java","lineNumber":1027,"sourceCode":"            }\n            int debugPort = 0;\n            try {\n                debugPort = Integer.parseInt(debugPortStr.trim());\n            } catch (Exception e) {\n                // ignore, use 0 (auto-assign)\n            }\n            // Apply system properties if configured\n            if (systemProperties != null) {\n                systemProperties.forEach(System::setProperty);\n            }\n            String[] args = buildDebugArgs(debugPort, threadCount);\n            logger.debug(\"karate.debug.port detected, delegating to debug server: {}\", Arrays.toString(args));\n            try {\n                Class<?> mainClass = Class.forName(\"io.karatelabs.debug.Main\");\n                Method runMethod = mainClass.getMethod(\"run\", String[].class);\n                return (SuiteResult) runMethod.invoke(null, (Object) args);\n            } catch (ClassNotFoundException e) {\n                logger.warn(\"karate.debug.port is set but karate-ide JAR is not on the classpath\");\n                return null;\n            } catch (Exception e) {\n                throw new RuntimeException(\"failed to start debug server\", e);\n            }\n        }\n\n        private String[] buildDebugArgs(int debugPort, int threadCount) {\n            List<String> args = new ArrayList<>();\n            args.add(\"-d\");\n            args.add(String.valueOf(debugPort));\n            if (env != null) {\n                args.add(\"-e\");\n                args.add(env);\n            }\n            if (tags != null) {\n                for (String tag : tags) {\n                    args.add(\"-t\");\n                    args.add(tag);","sourceCodeStart":1009,"sourceCodeEnd":1045,"githubUrl":"https://github.com/karatelabs/karate/blob/a22eb90246d958d15a47bf436693d0121ad2812d/karate-core/src/main/java/io/karatelabs/core/Runner.java#L1009-L1045","documentation":"The runner detected karate.debug.port in the system properties, which requests starting the debug/DAP server, but the optional karate-ide JAR containing io.karatelabs.debug.Main is not on the classpath. The runner logs this warning and returns null (proceeds as if debug mode was not requested) instead of failing the run.","triggerScenarios":"Setting -Dkarate.debug.port (or the equivalent option) while running Runner via Builder.path/features without the karate-ide artifact as a dependency.","commonSituations":"IDE plugins expecting the debug server; CI runs that inherit a debug-port JVM flag; upgrading to a modular build where karate-ide became an optional dependency.","solutions":["Add the karate-ide JAR/artifact to the classpath (Maven/Gradle dependency or -cp entry).","Remove the karate.debug.port system property if debug mode was not intended.","Verify the debug Main class is present: Class.forName(\"io.karatelabs.debug.Main\") should succeed.","If launched from an IDE, ensure the debug run configuration includes the karate-ide module on the runtime classpath."],"exampleFix":"// before (pom.xml)\n<dependency><groupId>io.karatelabs</groupId><artifactId>karate-core</artifactId></dependency>\n// after\n<dependency><groupId>io.karatelabs</groupId><artifactId>karate-core</artifactId></dependency>\n<dependency><groupId>io.karatelabs</groupId><artifactId>karate-ide</artifactId></dependency>","handlingStrategy":"fallback","validationCode":"try { Class.forName(\"io.karatelabs.debug.Main\"); } catch (ClassNotFoundException e) { /* karate-ide missing: unset karate.debug.port or add dependency */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Declare karate-ide as a test-scope dependency wherever debug mode is used.","Don't set karate.debug.port in shared CI configs or JVM defaults.","Check classpath for the debug Main class in custom launch scripts."],"tags":["debugging","classpath","optional-dependency"],"backgroundTag":"missing-optional-dependency","analyzedSha":"a22eb90246d958d15a47bf436693d0121ad2812d","analyzedAt":"2026-09-12T09:01:00.220Z","contentChangedAt":"2026-09-12T09:01:00.220Z","schemaVersion":2},"datasetVersion":"2026-09-16T19:17:19.609Z"}