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

Inspector issues #95

Closed
OliverUv opened this issue Jan 22, 2019 · 4 comments
Closed

Inspector issues #95

OliverUv opened this issue Jan 22, 2019 · 4 comments

Comments

@OliverUv
Copy link

OliverUv commented Jan 22, 2019

Hello! I've run into a couple of bugs with the inspector. Collecting them in an issue here. They're all observable with this small modification to the inspector example: https://gist.github.com/f2efc661205307f4b1a9086d751339c8

  • debugger; works as it should.
  • Stack seems to work as it should. Variables show up. I can execute code by writing into the console.
  • Breakpoints can be set and removed but do not trigger.
  • Step Over does not work (acts same as Resume Script Execution)
  • Step Into will step to the complicated log's copyInto statement where it's mapping over the arguments. Very weird!! Other than this weird case Step Into seems to work same as Resume Script Execution. I do not know why the same thing doesn't happen for the simple log implementation. At first I thought it was maybe because copyInto runs code from the default isolate / native, but the simple log's copyInto being skipped disproves that.

Node v 8.11.2
isolated-vm 1.7.7

> uname -srvpoi
Linux 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 GNU/Linux

An aside: I noticed while testing these things out that console.log is defined inside the isolates. It just doesn't log to the "default isolate console". You can see output of console.log when you have an inspector attached to the isolate, if you haven't tried defining it yourself. Comment out / delete the "complicated log" part of the Gist to see this in action.

@laverdet
Copy link
Owner

Could you please try this on nodejs v8.13.0 and report back. I have a feeling that this was fixed in v8.13.0 with nodejs/node#22714 and v10.10.0 with nodejs/node#22716.

@laverdet
Copy link
Owner

Also your report helped me notice a different issue that you didn't mention. Putting console.log(1) in the devtools console while the application is paused caused a segfault. I took care of that in c3e699e.

@OliverUv
Copy link
Author

v10.10.0: Step into, step over and step out of seem to work fine. Breakpoints still do not trigger.

v8.13.0: Step functions and breakpoints are broken, same as 8.11.2.

Glad you at least caught one bug thanks to this report even if it was incidental.

@laverdet
Copy link
Owner

Ok, I just noticed you're using Linux and tested it out myself and confirmed the same issue. Though the issue also seems to affect nodejs code running without isolated-vm.. that is, when running node --inspect breakpoints don't work either. It looks like this issue may be related: nodejs/node#23693.

You might try:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants