microsoft / deoptexplorer-vscode

A VS Code extension to visualize deoptimizations in your JavaScript and TypeScript code running in V8 (i.e., NodeJS, Edge, Chrome, etc.).
MIT License
754 stars 9 forks source link

dexnode not working in node 20 #7

Closed Didas-git closed 1 year ago

Didas-git commented 1 year ago

Running dexnode strict.js in node 20 gives the following error:

#
# Fatal error in , line 0
# Check failed: could not open file. If on Android, try passing --redirect-code-traces-to=/sdcard/Download/<file-name>.
#
#
#
#FailureMessage Object: 0x7fff55abc760
 1: 0xcf4b91  [node]
 2: 0x20bc181 V8_Fatal(char const*, ...) [node]
 3: 0xfb3140 v8::internal::Deoptimizer::Deoptimizer(v8::internal::Isolate*, v8::internal::JSFunction, v8::internal::DeoptimizeKind, unsigned long, int) [node]
 4: 0xfb31f5 v8::internal::Deoptimizer::New(unsigned long, v8::internal::DeoptimizeKind, unsigned long, int, v8::internal::Isolate*) [node]

For what i can see redirect-code-traces-to is defaulting to /dev/null and trying to override it doesnt seem to work, although this might not be the issue i want to leave it here as a note.

DanielRosenwasser commented 1 year ago

Interesting, looks similar to #5. What OS are you running this on?

Didas-git commented 1 year ago

Im running it on WSL2.0 Ubuntu on Win11

paulmillr commented 1 year ago

same stuff, macos arm

paulmillr commented 1 year ago

so far it's macos arm for me, WSL/Win11 for Didas and Fedora 38 in the other issue.

Makes me wonder whether this extension was actually tested thoroughly before the blog post went live?

paulmillr commented 1 year ago

The command actually is unwrapped to

node --log-deopt --redirect-code-traces --redirect-code-traces-to=/dev/null --log-ic --log-maps --log-maps-details --log-code --log-source-code --prof --log-internal-timer-events --detailed-line-info --logfile=v8.log --no-logfile-per-isolate FILE -p PROJ

the issue is in redirect-code-traces-to=/dev/null. If I change it to some local file, it's ok

rbuckton commented 1 year ago

It looks like this is a duplicate of #5. See https://github.com/microsoft/deoptexplorer-vscode/issues/5#issuecomment-1550427628 for a potential workaround for the time being.