Giter VIP home page Giter VIP logo

Comments (15)

connor4312 avatar connor4312 commented on May 13, 2024 1

It only shows up when you're debugging, since we essentially run a repl function over the debug protocol to get performance data for Node. There are a a few different ways you debug npm scripts (without needing a launch config ):

  • Select Debug: Node.js (preview) from the debug menu, which will autodetect npm scripts
  • Use the code lens that appears in your package.json to debug an npm scripts
  • Use the Npm Scripts view in the explorer (use the "Focus on NPM Scripts View" command if you've hidden this before) which has a debug button
  • or use the debug terminal via the "Create JavaScript Debug Terminal" command, and manually npm run start:dev

from vscode-js-profile-visualizer.

clementohNZ avatar clementohNZ commented on May 13, 2024

Same issue for me, except the "REALTIME PERFORMANCE" tab doesn't show.

from vscode-js-profile-visualizer.

connor4312 avatar connor4312 commented on May 13, 2024

@clementohNZ the view will only show if all of these are true:

  1. You have the extension installed and enabled
  2. You're debugging a node/chrome/extensionHost debug type
  3. You don't have debug.javascript.usePreview set to false

from vscode-js-profile-visualizer.

connor4312 avatar connor4312 commented on May 13, 2024

@oguimbal it looks like the view shows and there's no the "no info" placeholder, so I wonder if there's some JavaScript error. Are any errors visible in the console when you run Debug: Toggle Developer Tools

from vscode-js-profile-visualizer.

clementohNZ avatar clementohNZ commented on May 13, 2024

@connor4312 Thanks for your reply. Just tested it with a dummy index.js file that starts an express server and it works. Just wondering how I can configure this to work with npm scripts such as npm run start:dev

from vscode-js-profile-visualizer.

clementohNZ avatar clementohNZ commented on May 13, 2024

Awesome, the scripts view worked like a charm for the basic express app :)

When I tested it for Nest JS using start:dev script, it doesn't want to debug though. It exits the debugger immediately. The only way I can get it to debug the start:dev script is if I go to the package.json and debug the script by clicking the debug button and then selecting the script. When I do this however, the performance graph no longer shows up.

from vscode-js-profile-visualizer.

connor4312 avatar connor4312 commented on May 13, 2024

When I tested it for Nest JS using start:dev script, it doesn't want to debug though. It exits the debugger immediately.

How were you running this?

if I go to the package.json and debug the script by clicking the debug button and then selecting the script. When I do this however, the performance graph no longer shows up.

This is the same as #24 -- now published that

from vscode-js-profile-visualizer.

oguimbal avatar oguimbal commented on May 13, 2024

@connor4312 Nope. Not much in devtools :(

I only get this from time to time, but not systematically. Not sure it is related in any way.
nb: I tried to run a single js file while(true){} ... same result. Its not related to my project.

 ERR No debugger available, can not send 'getPerformance': Error: No debugger available, can not send 'getPerformance'
    at N.customRequest (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:6154:759)
    at u.$customDebugAdapterRequest (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4513:13)
    at p._doInvokeHandler (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4599:202)
    at p._invokeHandler (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4598:901)
    at p._receiveRequest (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4597:510)
    at p._receiveOneMessage (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4596:478)

I also get that when starting vscode:

Extension Host
localProcessExtensionHost.ts:258 [1022/110914.509:ERROR:registration_protocol_win.cc(103)] CreateFile: The system cannot find the file specified. (0x2)

And as a sidenote, I tried both of these, with the same result:
image

from vscode-js-profile-visualizer.

oguimbal avatar oguimbal commented on May 13, 2024

Oh, and I got this once, but never reproduced it:

image

from vscode-js-profile-visualizer.

KawOwl avatar KawOwl commented on May 13, 2024

@connor4312 Nope. Not much in devtools :(

I only get this from time to time, but not systematically. Not sure it is related in any way.
nb: I tried to run a single js file while(true){} ... same result. Its not related to my project.

 ERR No debugger available, can not send 'getPerformance': Error: No debugger available, can not send 'getPerformance'
    at N.customRequest (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:6154:759)
    at u.$customDebugAdapterRequest (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4513:13)
    at p._doInvokeHandler (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4599:202)
    at p._invokeHandler (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4598:901)
    at p._receiveRequest (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4597:510)
    at p._receiveOneMessage (file:///C:/Users/Oliv/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4596:478)

I also get that when starting vscode:

Extension Host
localProcessExtensionHost.ts:258 [1022/110914.509:ERROR:registration_protocol_win.cc(103)] CreateFile: The system cannot find the file specified. (0x2)

And as a sidenote, I tried both of these, with the same result:
image

Same issue for me, I'm running vscode on windows 10, connected to a linux vm in Vmware Workstation by using Remote Development pack.
After read this issue, I opened my Developer Tools and found the 'No debugger available' ERR, but never reproduced it too.

from vscode-js-profile-visualizer.

organic-scholar avatar organic-scholar commented on May 13, 2024

I am facing a similar kind of issue, real-time graphs are not showing after starting the node js script with the debugger I am observing the following message in developers tool console window.

main.js:630 Refused to load the script 'https://webviewview-vscode-js-profile-flame-realtime.vscode-webview-test.com/vscode-resource/file///Users/----/.vscode/extensions/ms-vscode.vscode-js-profile-flame-0.0.20/out/realtime.bundle.js' because it violates the following Content Security Policy directive: "script-src 'nonce-0.5420808713594358'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Version: 1.56.2
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Date: 2021-05-12T17:44:30.902Z (3 days ago)
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin x64 20.3.0

from vscode-js-profile-visualizer.

connor4312 avatar connor4312 commented on May 13, 2024

Thanks, just pushed a fix for that

from vscode-js-profile-visualizer.

oguimbal avatar oguimbal commented on May 13, 2024

BTW @connor4312 , I dont know if something has been done, but the problem has disapeared for me, somehow.

I dont know about others, but feel free to close this issue 😁

from vscode-js-profile-visualizer.

organic-scholar avatar organic-scholar commented on May 13, 2024

@connor4312 Thanks for the fix received the update, it's working now

from vscode-js-profile-visualizer.

connor4312 avatar connor4312 commented on May 13, 2024

Ok, thanks for confirming.

We've made many changes to web views which should be more reliable nowadays. Closing this unless I hear of ongoing issues.

from vscode-js-profile-visualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.