Skip to content

Conversation

@jtulach
Copy link
Contributor

@jtulach jtulach commented Apr 29, 2025

I am trying to use VSCode extension to debug native image and I am getting:

java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "name" is null
	at org.netbeans.modules.java.lsp.server.ui.AbstractLspInputOutputProvider$LspIO.<init>(AbstractLspInputOutputProvider.java:184)
	at org.netbeans.modules.java.lsp.server.ui.AbstractLspInputOutputProvider.getIO(AbstractLspInputOutputProvider.java:54)
	at org.netbeans.modules.java.lsp.server.ui.AbstractLspInputOutputProvider.getIO(AbstractLspInputOutputProvider.java:39)
	at org.openide.io.BridgingIOProvider.getIO(BridgingIOProvider.java:83)
	at org.netbeans.modules.extexecution.InputOutputManager.createInputOutput(InputOutputManager.java:163)
	at org.netbeans.api.extexecution.ExecutionService.getInputOutput(ExecutionService.java:336)
	at org.netbeans.api.extexecution.ExecutionService.run(ExecutionService.java:160)
	at org.netbeans.api.extexecution.ExecutionService.run(ExecutionService.java:156)
	at org.netbeans.modules.cpplite.debugger.ni.NIDebuggerProviderImpl.start(NIDebuggerProviderImpl.java:156)
	at org.netbeans.modules.nativeimage.api.debug.NIDebugger.start(NIDebugger.java:129)
	at org.netbeans.modules.java.nativeimage.debugger.api.NIDebugRunner.start(NIDebugRunner.java:107)
	at org.netbeans.modules.java.lsp.server.debugging.launch.NbLaunchDelegate.startNativeDebug(NbLaunchDelegate.java:468)
	at org.netbeans.modules.java.lsp.server.debugging.launch.NbLaunchDelegate.lambda$nbLaunch$6(NbLaunchDelegate.java:364)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.netbeans.modules.java.lsp.server.debugging.launch.NbLaunchDelegate.lambda$nbLaunch$7(NbLaunchDelegate.java:362)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)

after a bit of debugging I have a fix that specifies displayName and seems to work fine. Then the debugging of native image gets started. My launch configuration:

  {
      "type": "nativeimage",
      "request": "launch",
      "name": "Launch Native Image",
      "nativeImagePath": "${workspaceFolder}/built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso",
      "args": "--jvm /home/devel/bin/graalvm/ --run ${file}"
    }

CCing @jlahoda, @entlicher, @MartinBalin

Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@neilcsmith-net neilcsmith-net added this to the NB27 milestone Apr 30, 2025
@lkishalmi
Copy link
Contributor

This patch seems to be trivial enough to be in NB26-rc, if intended.

@neilcsmith-net
Copy link
Member

This patch seems to be trivial enough to be in NB26-rc, if intended.

The plugin was removed from the RC and main delivery artefacts.

@jtulach jtulach merged commit bc8b9f7 into apache:master May 4, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants