JetBrains/intellij-community · warning · ConfigurationException
error.text.invalid.port
error.text.invalid.port
Error message
Port is not specified
What it means
Thrown by GenericDebuggerParametersRunnerConfigurable.checkPort during validation of the remote debug run configuration UI: when the Socket transport is selected, the port field must parse to a positive number; parsePort clamps invalid/empty input to 0 and checkPort raises a ConfigurationException with error.text.invalid.port ('Port is not specified').
Source
Thrown at java/debugger/impl/src/com/intellij/debugger/impl/GenericDebuggerParametersRunnerConfigurable.java:301
return DebuggerSettings.getInstance().getTransport();
}
else {
return mySocketTransport.isSelected() ? DebuggerSettings.SOCKET_TRANSPORT : DebuggerSettings.SHMEM_TRANSPORT;
}
}
private String getPort() {
if (isSocket()) {
return String.valueOf(myPortField.getText());
}
else {
return myAddressField.getText();
}
}
private void checkPort() throws ConfigurationException {
if (isSocket() && parsePort() == 0) {
throw new ConfigurationException(JavaDebuggerBundle.message("error.text.invalid.port"));
}
}
private int parsePort() {
return Math.max(0, StringUtil.parseInt(myPortField.getText(), 0));
}
private void setTransport(int transport) {
mySocketTransport.setSelected(transport == DebuggerSettings.SOCKET_TRANSPORT);
myShmemTransport.setSelected(transport != DebuggerSettings.SOCKET_TRANSPORT);
}
private void setIsLocal(boolean b) {
myTransportPanel.setVisible(true);
myDebuggerSettings.setVisible(b);
myIsLocal = b;
}
View on GitHub (pinned to be881553f2)
Solutions
- Enter a valid TCP port (1-65535) in the Port field of the remote configuration
- If attaching over shared memory on Windows, switch transport to Shmem and fill the address field instead
- Verify the debuggee's -agentlib:jdwp ...,server=y address=PORT matches the configured port
Example fix
# before: debuggee java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 App # IDE remote config port field empty -> error # after: IDE remote config port = 5005
Defensive patterns
Strategy: validation
Validate before calling
int port = StringUtil.parseInt(portField.getText(), 0);
if (isSocket() && (port <= 0 || port > 65535)) {
// block apply and highlight the port field
} Try / catch
try {
checkPort();
} catch (ConfigurationException e) {
// focus the port field, show 'Port is not specified'
} Prevention
- Always fill the port field for socket transport remote configurations
- Copy the port straight from the debuggee's -agentlib:jdwp address=PORT
- Validate before apply so the error surfaces in the dialog, not at launch
When it happens
Trigger: Applying a remote debug configuration where isSocket() is true and StringUtil.parseInt(myPortField.getText(), 0) yields 0 — empty port field, non-numeric text, negative numbers, or a value that parses to 0; checkPort() throws before the configuration is saved/started.
Common situations: User creates a 'Remote JVM Debug' configuration and leaves the port empty; pastes an address into the wrong field while Shmem vs Socket transport toggle is set to Socket; port field contains whitespace or formatting from copy-paste.
Related errors
- error.jdk.not.specified
- Malformed exclusion, 'groupId:artifactName' format is expect
- Interface method invocation is not supported in JVM {}. Use
- There is no executable code at {0}:{1}
- Cannot construct wrapper object for value of type {}: Unable
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/f1e1a9d680ce9f3c.
Report an issue: GitHub.