Skip to content

Commit

Permalink
Change debug port for Quarkus language server
Browse files Browse the repository at this point in the history
Signed-off-by: David Kwon <[email protected]>
  • Loading branch information
dkwon17 authored and fbricon committed Aug 21, 2019
1 parent 70d273d commit a27e083
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Step 2. Open the Debugging tab, select and run
## Debugging
### Debugging the Quarkus language server:
In an IDE of your choice, set the debugger configuration to connect
to localhost, port 1054.
to localhost, port 1064.

If using VSCode, open `quarkus-ls/quarkus.ls/` in VSCode. The proper
debugger configurations are already defined in `.vscode/`.
Expand Down
5 changes: 3 additions & 2 deletions src/languageServer/javaServerStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as path from 'path';
const glob = require('glob');

const DEBUG = startedInDebugMode();
const DEBUG_PORT = 1064;
const SERVER_NAME = 'com.redhat.quarkus.ls-uber.jar';

export function prepareExecutable(requirements: RequirementsData): Executable {
Expand All @@ -22,9 +23,9 @@ export function prepareExecutable(requirements: RequirementsData): Executable {
function prepareParams(): string[] {
const params: string[] = [];
if (DEBUG) {
params.push('-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1054,quiet=y');
params.push(`-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${DEBUG_PORT},quiet=y`);
// suspend=y is the default. Use this form if you need to debug the server startup code:
// params.push('-agentlib:jdwp=transport=dt_socket,server=y,address=1054');
// params.push(`-agentlib:jdwp=transport=dt_socket,server=y,address=${DEBUG_PORT}`);
}

const vmargs = workspace.getConfiguration("xml").get("server.vmargs", '');
Expand Down

0 comments on commit a27e083

Please sign in to comment.