Closed astrelsky closed 3 years ago
Hi @astrelsky,
I'm not quite sure, but I guess you have also set the setting: java.test.defaultConfig
. If that is the case, you can just remove that setting or set it to "GhidraTest"
.
Please feel free to let me know if this can resolve your problem
Hi @astrelsky,
I'm not quite sure, but I guess you have also set the setting:
java.test.defaultConfig
. If that is the case, you can just remove that setting or set it to"GhidraTest"
.Please feel free to let me know if this can resolve your problem
I initially had it set to that but removed it and explicitly selected "GhidraTest" as a sanity check. The same results are produced.
Hmm, I was trying to repro this issue but not able to.
The implementation is here: https://github.com/microsoft/vscode-java-test/blob/master/src/utils/launchUtils.ts#L58-L60
The vmargs should be inserted. (Suppose you are using JUnit 4)
Hmm, I was trying to repro this issue but not able to.
The implementation is here: https://github.com/microsoft/vscode-java-test/blob/master/src/utils/launchUtils.ts#L58-L60
The vmargs should be inserted. (Suppose you are using JUnit 4) I'm attaching the full unedited (except for a few privacy snips) output of the java language server and java test runner to this comment.
If I must I'll attempt to debug the test runner tomorrow. No matter what configuration I make or set I get the same results.
language_server.log test_runner.log
These are both my global and workspace settings. workspace:
{
"java.autobuild.enabled": true,
"java.test.config": {
"name": "GhidraTest",
"workingDirectory": "${workspaceFolder}",
"args": ["-c", "ghidra.GhidraClassLoader"],
"vmArgs": ["-Djava.system.class.loader=ghidra.GhidraClassLoader", "-Declipse.project.dir=${workspaceFolder}", "-Dpython.console.encoding=UTF-8", "-Dfile.encoding=UTF8", "-Dlog4j.skipJansi=true", "-Duser.country=US", "-Duser.language=en", "-Dsun.stdout.encoding=UTF-8", "-Dsun.err.encoding=UTF-8", "-Dvisualvm.display.name=Ghidra"]
},
"java.dependency.packagePresentation": "flat"
}
global:
{
"telemetry.enableTelemetry": false,
"java.format.settings.url": "${env:GHIDRA_SRC}\\eclipse\\GhidraEclipseFormatter.xml",
"java.format.settings.profile": "GhidraEclipseFormatter",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.configuration.checkProjectSettingsExclusions": false,
"java.trace.server": "verbose",
"terminal.integrated.rendererType": "dom",
"workbench.startupEditor": "newUntitledFile",
"java.codeGeneration.useBlocks": true,
"java.completion.guessMethodArguments": true,
"java.completion.importOrder": [
"java",
"ghidra",
"javax",
"com",
"org"
],
"java.implementationsCodeLens.enabled": true,
"java.referencesCodeLens.enabled": true,
"java.errors.incompleteClasspath.severity": "ignore",
"java.test.report.position": "currentView",
"python.jediEnabled": false,
"python.insidersChannel": "off",
"java.test.report.showAfterExecution": "always",
"java.test.message.hintForSetingDefaultConfig": false,
"explorer.confirmDelete": false,
"java.test.log.level": "verbose",
"files.associations": {
"*.jj": "java"
},
"editor.tokenColorCustomizations": {
"[sleigh]": {
"comments": "#229977"
}
},
"java.codeGeneration.generateComments": true,
"java.completion.overwrite": false,
"java.maven.downloadSources": true,
"java.debug.logLevel": "verbose"
}
Hi @astrelsky,
I guess I found the root cause. It should be vmargs
, not vmArgs
.
I need to find out a way to validate the key names in the implementation. Or make it align with the launch configuration. Sorry for the confusion.
Hi @astrelsky,
I guess I found the root cause. It should be
vmargs
, notvmArgs
.I need to find out a way to validate the key names in the implementation. Or make it align with the launch configuration. Sorry for the confusion.
Yes this was the cause. The good old copypasta strikes again. Thank you for your help. I'll leave this open until the naming situation is resolved.
I have the following defined in my workspace /.vscode/settings.json
Upon running a test and explicitly selecting the GhidraTest configuration option the following output is produced. Note the incorrect vmargs. (If args is set they also get ignored.)
The NullPointerException that is causing my test to fail is because the extension points aren't being loaded which I think is because the classloader isn't being set.