ncdbg icon indicating copy to clipboard operation
ncdbg copied to clipboard

Not stopping on breakpoint

Open mskcork opened this issue 4 years ago • 15 comments

Using C:\Program Files\AdoptOpenJDK\jdk-11.0.5.10-openj9

See errors in attached logs

ncdbg.log

mskcork avatar May 12 '20 20:05 mskcork

I was just wondering yesterday whether anyone uses ncdbg anymore. I guess this answers it. :)

I will try to take a look at this in the coming days. Please be patient.

provegard avatar May 13 '20 05:05 provegard

Apologies for the delay. I can reproduce the bug but I have no solution yet.

provegard avatar Jun 03 '20 05:06 provegard

Thanks for the update. I appreciate the effort.

mskcork avatar Jun 03 '20 07:06 mskcork

I've also picked up ncdbg again (as a user) after a layoff. Right now I can't hit breakpoints in VSCode, although I can use the debugger keyword. Perhaps that's a workaround for @mskcork.

I can't do anything in Chrome DevTools (basically the URL ncdbg tells me to go to doesn't open DevTools in Chrome anymore). That's using 0.8.4., haven't looked at master. I may log an issue about that at some point. :)

davidpcaldwell avatar Jun 17 '20 20:06 davidpcaldwell

@davidpcaldwell I also noticed the URL doesn't work. The new one seems to be:

devtools://devtools/bundled/inspector.html?ws=${listenAddr.host}:${listenAddr.port}/dbg

I have some unpushed commits, will push them shortly.

@mskcork I have been swamped with work, so I haven't really had time to look at this. But I have some time tomorrow, so here's hoping I can find a solution.

provegard avatar Jun 17 '20 21:06 provegard

Sounds good, @provegard -- DevTools API seems to be the way to go in JavaScript debugging these days, so good that you've implemented it for Nashorn. I'll have a look at your URL soon -- my script authors tthat URL itself, so I ahould be able to work around it if the output from ncdbg is incorrect.

In the meantime, good luck! I am not yet running from a local checkout, but I was once, and can get back to there to help with validation if I do.

davidpcaldwell avatar Jun 17 '20 22:06 davidpcaldwell

Using the new URL you provided, @provegard, I am able to debug in Chrome, same situation as VSCode -- scripts stop at debugger; but not at breakpoints, best I can tell.

davidpcaldwell avatar Jun 18 '20 11:06 davidpcaldwell

Ok, I tried this morning and it stopped on breakpoints when running the target with OpenJDK 13, but not OpenJDK11-OpenJ9.

provegard avatar Jun 18 '20 11:06 provegard

@davidpcaldwell which JDK do you use?

provegard avatar Jun 18 '20 11:06 provegard

Many thanks for all the effort and the feedback.

mskcork avatar Jun 18 '20 11:06 mskcork

My test was with this: "java.runtime.version": "1.8.0_232-BellSoft-b10". Running with JDK 11 I get a different error having to do with JAVA_HOME being wrong, not sure how that's happening -- I'll have to poke at it.

Update: looks like my ncdbg launching script makes a wrong assumption about the structure of the JDK 11 distribution. I'll fix it and see what happens.

Update (ha!): My Nashorn embedding doesn't work on JDK 11. So I'll have to debug that first. But ncdbg at least breaks on the exception!

davidpcaldwell avatar Jun 18 '20 11:06 davidpcaldwell

I was just wondering yesterday whether anyone uses ncdbg anymore. I guess this answers it. :)

I will try to take a look at this in the coming days. Please be patient.

Hello, we have had issues with ncdbg not stopping for a while now and had stopped using it, we are testing the newest version. Hopefully we can make it work because it was of great use to us in the past. Also thanks again for working on it, obviously a reliable debugging tool for Nashorn should have been the responsibiltiy of Oracle but instead they decided to deprecate it.

benoitcerrina avatar Jun 18 '20 12:06 benoitcerrina

@benoitcerrina which JDK do you use?

provegard avatar Jun 18 '20 13:06 provegard

@mskcork the error in the log file tells us that the remote JVM does not recognize java.lang.Object[] for the class loader in question. This is quite odd. I have opened an issue in the OpenJ9 repo: https://github.com/eclipse/openj9/issues/9965

When I test with a regular OpenJDK 11 JVM, ncdbg stops on breakpoints as expected.

provegard avatar Jun 21 '20 07:06 provegard

@mskcork there should be a fix in the OpenJ9 project, see the linked issue. I do not know when that fix will make it into a release.

@benoitcerrina @davidpcaldwell if you have experienced the same thing, do you have any exception stack traces to share?

provegard avatar Jun 28 '20 05:06 provegard