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

NetBeans only supports obsolete node 6 debug protocol #4127

Closed
helpmex-001 opened this issue May 18, 2022 · 26 comments · Fixed by #4220
Closed

NetBeans only supports obsolete node 6 debug protocol #4127

helpmex-001 opened this issue May 18, 2022 · 26 comments · Fixed by #4220
Assignees
Labels
kind:bug Bug report or fix

Comments

@helpmex-001
Copy link

Apache NetBeans version

Apache NetBeans 13

What happened

Cannot use debug on node.js project, need some example step by step

How to reproduce

C:\nodejs\node.exe: [DEP0062]: node --debug and node --debug-brk are invalid. Please use node --inspect and node --inspect-brk instead.
Message i get on attempt to debug.

Did this work correctly in an earlier version?

No

Operating System

win 10 pro node 12.13.1

JDK

13

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

Forever

Are you willing to submit a pull request?

Yes

Code of Conduct

Yes

@helpmex-001 helpmex-001 added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels May 18, 2022
@matthiasblaesing matthiasblaesing removed the needs:triage Requires attention from one of the committers label May 18, 2022
@matthiasblaesing matthiasblaesing changed the title debug node.js NetBeans only supports obsolete node 6 debug protocol May 18, 2022
@helpmex-001
Copy link
Author

who can do something? please advise.

@matthiasblaesing matthiasblaesing self-assigned this Jun 11, 2022
@matthiasblaesing matthiasblaesing added this to the NB15 milestone Jun 11, 2022
@matthiasblaesing
Copy link
Contributor

See the referenced PR for an implementation. A test build is available here:

http://doppel-helix.eu/NetBeans-dev-dev-8c9b627ced2efe6149d4df4df5f5e6d4e62181bb-release.zip

It would be good if you could test it.

@helpmex-001
Copy link
Author

done the settings in #4220
in 2 img we see same problems
fail1
fail2

@matthiasblaesing
Copy link
Contributor

Not sure what you want to tell me. What I see is, that yo configured a node in version 12 and then you overrode the default with the wrong protocol.

Since node 6.X the debug protocol is the "Chrome DevTools protocol". "V8 debug protocol" supported ended with the 6 series.

It would help if you would not just throw in some screenshots without context and describe what you did, what you expected and what really happened. Screenshots can help, but without context they are useless.

@helpmex-001
Copy link
Author

helpmex-001 commented Jun 14, 2022 via email

@matthiasblaesing
Copy link
Contributor

I assume, that you mean the second screenshot. That screenshot was only done to show the available protocols.

you posted to set on V8, my question is simple can we debug nodejs with netbeans, if is posible

Yes - I tried it with a simple script. And could inspect variables, single step through the code, set breakpoints and in general do what I'd expect from a debugger.

...give example hot to set exactly for versions nodejs like 12. On a sceen you posted i see version 10 nodejs so i am confused

As written node 6+ is "Chrome DevTools protocol" and this is also true for 12.

@helpmex-001
Copy link
Author

helpmex-001 commented Jun 15, 2022

i selected Chrome DevTools protocol booth in tools options...and project options
it say please wait
fail3-15062022
When i stop de debbuger and try again...
Netbeans go in a state where i cannot click on any button , in task manager it do not say "Not reponding"
I used your link distribution to try.
Also after certain time netbeans window go blank, just a blank rectangle

@matthiasblaesing
Copy link
Contributor

Please show the message log from the NetBeans run (See: https://stackoverflow.com/questions/50462124/netbeans-where-to-find-the-ide-log). Please also get a thread dump from the moment where NetBeans seems to be unresponsive. With a JDK installed you can run:

# Get the PID of the Java process (look for the entry named "Main")
jps
# Get the threaddump
jstack <PID> > stacktrace.txt

@helpmex-001
Copy link
Author

i am very busy few days, i will resume after, sorry...

@matthiasblaesing matthiasblaesing modified the milestones: NB15, NB16 Jul 9, 2022
@matthiasblaesing
Copy link
Contributor

Changing milestone to NB16 - I currently have no personal use case and the reported did not yet test.

@neilcsmith-net
Copy link
Member

I'm removing milestone from this issue entirely. @matthiasblaesing please feel free to manage this one as you wish.

@neilcsmith-net neilcsmith-net removed this from the NB16 milestone Oct 31, 2022
@ChristoforosKor
Copy link

Hello, I am having the same problem with Netbeans 19 on Centos 9. At my HTML/JS node options there is not any debug protocol to choose.
How can I resolve it?

@matthiasblaesing
Copy link
Contributor

@ChristoforosKor what do you want to do? If you want to debug code running in a webbrowser, this is not the right PR. This is about debugging CLI node programms. In theory the Chrome Developer Tools Protocol can be used with Chrome/Chromium, but given lack of interest in this, I did not followup. I don't like Chrome and Firefox seems to have only a very limited implementation of CDT available, that at my time of checking did not include JS debugging.

@ChristoforosKor
Copy link

ChristoforosKor commented Oct 3, 2023 via email

@ChristoforosKor
Copy link

Hello,
Anyone can help? I am using netbeans 19 on a centos 8 pc for development.
I cannot start the debugger cause I get the message that I use the old version of debugging tools.
I also don't see a way to select a debug protocol on options like those shown at #4127 (comment) as seen at the screen shots below.

screenshot_node

screenshot_properties

Any help is appreciated.

@matthiasblaesing
Copy link
Contributor

@ChristoforosKor please give this some time. PR #4220 was bitrotting for more than a year because no further testing happend, I'll not just drop everything just because now the question is raised again. The debug options are not there because #4220 was never finalized.

@matthiasblaesing
Copy link
Contributor

@ChristoforosKor please have a look at PR #4220. I updated it to be based on current master. This should allow you to test whether that would help you. The Checks page offers a testable development build:

@matthiasblaesing
Copy link
Contributor

@ChristoforosKor did this work for you?

@ChristoforosKor
Copy link

@matthiasblaesing Hello, I am sorry, I am not able to download from https://github.com/apache/netbeans/suites/17008902928/artifacts/971564310.
I get a 404 error (following is the response from wget):
wget https://github.com/apache/netbeans/suites/17008902928/artifacts/971564310
--2023-10-15 10:24:54-- https://github.com/apache/netbeans/suites/17008902928/artifacts/971564310
Εύρεση του github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... συνδέθηκε.
Η αίτηση για HTTP στάλθηκε, αναμονή απάντησης... 404 Not Found
2023-10-15 10:25:35 ΣΦΑΛΜΑ 404: Not Found.

Translating the above from greek language to english
wget https://github.com/apache/netbeans/suites/17008902928/artifacts/971564310
--2023-10-15 10:24:54-- https://github.com/apache/netbeans/suites/17008902928/artifacts/971564310
Searching github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP send, waiting for response... 404 Not Found
2023-10-15 10:25:35 Error 404: Not Found.

@matthiasblaesing
Copy link
Contributor

Don't know what github did to break downloads, but it works from browser. Please try again.

@neilcsmith-net
Copy link
Member

As far as I know you need to be signed in to GitHub to download workflow artefacts, so it might be that (although 404 an odd response).

@matthiasblaesing
Copy link
Contributor

@neilcsmith-net you are right. In a private browsing tab I can open the checks results overview page, but the artifact is not accessible. In this case a 404 is indeed wrong and 403 or 401 would be right.

@ChristoforosKor
Copy link

Ok, O downloaded ( I was loged in) and I managed to debug with chrome dev tools.
Thanks a lot!.

Will this patch be imported in the next version (20)?

@matthiasblaesing
Copy link
Contributor

@ChristoforosKor thank you for the check. No this will not make it for NB20. I'll have to get back into the PR, rereview it and get it into a mergeable state.

@ChristoforosKor
Copy link

Hello,

Is this available on 21 release or will it be available on 22 release?

@matthiasblaesing
Copy link
Contributor

@ChristoforosKor thank you for the reminder. I just merged the change to master - if nothing catastrophic happens, the change will be part of NB22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants