Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tcpDebug option and tracing #618

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Decodetalkers
Copy link
Contributor

this made me easier to debug the project

and fix some warning

@github-actions github-actions bot added the build Related to the language server's own build (including Gradle updates etc.) label Jan 19, 2025
@Decodetalkers
Copy link
Contributor Author

@fwcd this is for the log feature

@@ -91,6 +92,7 @@ tasks.register<JavaExec>("debugRun") {
standardInput = System.`in`

jvmArgs(debugArgs)
args(listOf("--tcpServerPort", serverDebugPort, "--tcpDebug", "--tracingLog"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm this changes the default from stdio, right? Does

./gradlew debugRun --args '--tcpServerPort ... --tcpDebug --tracingLog'

work? If so, I wouldn't change this.

Copy link
Contributor Author

@Decodetalkers Decodetalkers Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems not work.. Maybe I do not really know how to make gradle work.. I also try to use --args to pass argument to task.. but it never works

@@ -176,6 +192,6 @@ class KotlinLanguageServer(
// Fixed in https://github.com/eclipse/lsp4j/commit/04b0c6112f0a94140e22b8b15bb5a90d5a0ed851
// Causes issue in lsp 0.15
override fun getNotebookDocumentService(): NotebookDocumentService? {
return null;
}
return null;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here (though if we reformat this, we could remove the redundant semicolon and write the function as = null directly)

Comment on lines 29 to 30
@Parameter(names = ["--tracingLog"])
var tracingLog: Boolean = false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably prefer making this a more general option for passing the log level if that's an option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I will make this part to pass string, and if is tracing, I will tracing the function class name

shared/src/main/kotlin/org/javacs/kt/Logger.kt Outdated Show resolved Hide resolved
shared/src/main/kotlin/org/javacs/kt/Logger.kt Outdated Show resolved Hide resolved
@Decodetalkers
Copy link
Contributor Author

Decodetalkers commented Jan 21, 2025

Sorry.. seems after rebase.. the commit disappear..

@Decodetalkers Decodetalkers reopened this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to the language server's own build (including Gradle updates etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants