Node.js breakpoints

CodeLite installation/troubleshooting forum
NuSkooler
CodeLite Enthusiast
Posts: 10
Joined: Fri Sep 04, 2015 12:33 am
Genuine User: Yes
IDE Question: C++
Location: USA
Contact:

Re: Node.js breakpoints

Post by NuSkooler »

Hi again!

I tried the updated .deb (uninstall + reinstall) this morning. So far, it seems to operate the same as the previous build: Breakpoints are hit (and visually represented) but symbols in the debugger are not available in the inspector and no hover tooltip. Looks the same as the previous screen shot I posted.

If there is something else I can do to provide better information, let me know!
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Node.js breakpoints

Post by eranif »

NuSkooler wrote:and no hover tooltip
Can you interact with any of the views in the debugger pane? (try sending an expression to Node.js from the "Console" view, click on a line in the Callstack view etc)
NuSkooler wrote:no hover tooltip
You need to place the caret at the variable / expression and click CTRL to get the tooltip

Can you send me the same debug session (codelite.log) as before?

Eran
Make sure you have read the HOW TO POST thread
NuSkooler
CodeLite Enthusiast
Posts: 10
Joined: Fri Sep 04, 2015 12:33 am
Genuine User: Yes
IDE Question: C++
Location: USA
Contact:

Re: Node.js breakpoints

Post by NuSkooler »

A few pieces of data:
  • I can go up/down the call stack window -- inspection/etc. does not function at any level but I can traverse
  • Hover + CTRL just shows only something like "#<Object>"
  • I can send things in the console window, e.g. JSON.stringify(someobject). If the object is small enough it will dump otherwise the command seems to be ignored
  • An object that I can dump with the console cannot be inspected with the hover or locals view
Attached is a new log
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Node.js breakpoints

Post by eranif »

NuSkooler wrote:Hover + CTRL just shows only something like "#<Object>"
This is what Node.js returns when I pass the "evaluate" command (depends on what you pass)
NuSkooler wrote:I can send things in the console window, e.g. JSON.stringify(someobject). If the object is small enough it will dump otherwise the command seems to be ignored
Can you give an example for such command that is being ignored?

It took me a while to understand, but I think that there is a lack of communication here...
Initially, I thought that you are saying that you can not click and expand items in the inspector view (the one on the left)
I think that I now understand that your problem is that some of the variables are shown with empty value and type, is this correct? (for example: config.art does not show anything in the inspector)

If this is the problem, then I think I fixed it (bug in CodeLite). I will try and upload new build tonight for you to test (I am not sure what is your timezone)

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Node.js breakpoints

Post by eranif »

Please test this build:
http://codelite.org/downloads/codelite/ ... x86_64.deb

Thanks,
Eran
Make sure you have read the HOW TO POST thread
NuSkooler
CodeLite Enthusiast
Posts: 10
Joined: Fri Sep 04, 2015 12:33 am
Genuine User: Yes
IDE Question: C++
Location: USA
Contact:

Re: Node.js breakpoints

Post by NuSkooler »

eranif wrote: I think that I now understand that your problem is that some of the variables are shown with empty value and type, is this correct? (for example: config.art does not show anything in the inspector)
That is correct. I just tried the 8.2.4 build and that portion is now working!!!

Inspection still does not work properly when placing & hover + CTRL. The window will only show "#<Object>" but no values within the object (attached is a SS of this). I will attempt to narrow down what works with JSON.stringify() vs what does not and report back.

Thank you yet again -- progress is being made!!!
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Node.js breakpoints

Post by eranif »

NuSkooler wrote:The window will only show "#<Object>" but no values within the object (attached is a SS of this)
This is because I pick the "text" attribute for tooltips and in this case Node.js returns simply "#<Object>". To get something more out of this, I will need to create a complex tooltip
similar to the one we are using in gdb (a tree view tip, interactive where you can expand the nodes and explore)
NuSkooler wrote:I will attempt to narrow down what works with JSON.stringify() vs what does not and report back.
JSON.stringify fails because of "TypeError: Converting circular structure to JSON" error messages. Atm, CodeLite is hiding these messages, I will delegate them to the user

Eran
Make sure you have read the HOW TO POST thread
NuSkooler
CodeLite Enthusiast
Posts: 10
Joined: Fri Sep 04, 2015 12:33 am
Genuine User: Yes
IDE Question: C++
Location: USA
Contact:

Re: Node.js breakpoints

Post by NuSkooler »

eranif wrote:This is because I pick the "text" attribute for tooltips and in this case Node.js returns simply "#<Object>". To get something more out of this, I will need to create a complex tooltip
similar to the one we are using in gdb (a tree view tip, interactive where you can expand the nodes and explore)
Ah OK, I was under the impression that this was already the case. I think I must have saw a C++ debugging session SS and assumed it was the same in Node.js. Consider this a +1 for a feature request :D
eranif wrote:JSON.stringify fails because of "TypeError: Converting circular structure to JSON" error messages. Atm, CodeLite is hiding these messages, I will delegate them to the user
Again, makes sense. I do in fact have a couple circular refs in the objects I was looking at that I need to clean up.

In any case, variables are now visible via the inspector for Node.js which is an huge step forward!
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Node.js breakpoints

Post by eranif »

NuSkooler wrote:Ah OK, I was under the impression that this was already the case. I think I must have saw a C++ debugging session SS and assumed it was the same in Node.js. Consider this a +1 for a feature request
I have re-written the NodeJS debugger tooltip and it now behaves the same as the C++ one, i.e. an interactive tree.
See attached screenshot:
nodejs-tooltip.png
I will upload a build for you to test (will update this thread)

Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Node.js breakpoints

Post by eranif »

I have uploaded a new CodeLite 8.2.4 weekly build, it will be great if you could test it and report back.
Also, a suggestions for how to improve the NodeJS plugin are greatly appreciated

Eran
Make sure you have read the HOW TO POST thread
Post Reply