Comments (15)
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.
Same issue for me, except the "REALTIME PERFORMANCE" tab doesn't show.
from vscode-js-profile-visualizer.
@clementohNZ the view will only show if all of these are true:
- You have the extension installed and enabled
- You're debugging a node/chrome/extensionHost debug type
- You don't have
debug.javascript.usePreview
set tofalse
from vscode-js-profile-visualizer.
@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.
@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.
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.
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.
@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:
from vscode-js-profile-visualizer.
Oh, and I got this once, but never reproduced it:
from vscode-js-profile-visualizer.
@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 filewhile(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:
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.
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.
Thanks, just pushed a fix for that
from vscode-js-profile-visualizer.
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.
@connor4312 Thanks for the fix received the update, it's working now
from vscode-js-profile-visualizer.
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)
- Flame chart times aren't useful when looking at sub 10ms
- Left or right clicking resets zoom
- Extend timestamp bars the whole way down
- Allow quickly measuring a section using shift
- Consider enabling retainContextWhenHidden
- Hovering rows in the table shows the text caret cursor
- Implement tree (top down)
- Mention "CPU profile" in description
- Improve readme for in product and marketplace viewing
- Changing CSS in vscode-js-profile-core won't apply until the watch task is restarted
- Function names are truncated by large file names
- Restrict repo to the VS Code team
- Saving gives an error
- Hover can be obscured by selected element info
- Allow changing current call stack box without removing the previously focused one
- CPU profile annotations show doubled values HOT 1
- Opening multiple large .cpuprofile files seems to crash the webview HOT 3
- Support virtual filesystems HOT 1
- improve array index checks HOT 1
- Flame chart text rendering is not synchronized with rectangles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-js-profile-visualizer.