Search code examples
intellij-ideajava-web-start

Remote debugging Java Webstart 8 applications in Intellij IDEA - no executable code found


I'm trying to debug a webstart application launched via a process builder:

List<String> cmd = new ArrayList<String>();
cmd.add(getJavaWebStartCommand()); // path to javaws.exe
cmd.add(url); //url to jnlp
String[] command = cmd.toArray(new String[cmd.size()]);
ProcessBuilder processBuilder = new ProcessBuilder(command);

Map<String, String> env = new HashMap<>();
env.put("JAVA_TOOL_OPTIONS","\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8005\"");
processBuilder.environment().putAll(env);

processBuilder.start();

Everything looks fine if I check it via Process Explorer. ("JAVA_TOOL_OPTIONS" is set properly)

In IDEA I made a remote configuration (localhost, 8005, sources: 'whole project') and connected successfully to it.

The problem are the breakpoints: "No executable code found..."

I already tried to invalidate the caches, but no luck.

The code that's retrieved via webstart is identical with the one from my IDE, but it's not compiled locally (remote build machine + jar signing). Can this be an issue?


Solution

  • Is it compiled with -g flag (generate debug information)?