You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Profiler to measure performance in Chrome, it seems to be impossible to stop the profiler and view the data after the script has finished running.
Reproduction:
Create a file (chrome-inspector-test.js) that runs for 5 seconds and then exits:
'use strict';constfiveSecondsFromNow=Date.now()+5000;while(Date.now()<fiveSecondsFromNow){// do nothing}
Run it with node --inspect-brk chrome-inspector-test.js
Go to chrome://inspect in Chrome
Under "Remote Target" and "chrome-inspector-test.js", click "inspect".
In the new window, go to the "Profiler" tab and click "Start".
Wait for more than 5 seconds.
Click "Stop".
Expected behavior: After clicking "Stop", the profile should stop recording, and it should be possible to see the performance data.
Actual behavior: After clicking "Stop", the devtools window gets stuck looking like this. It's not possible to switch tabs. Profile 1 still appears to be recording, and it doesn't seem to be possible to stop it. The Node process is still running, and has printed "Waiting for the debugger to disconnect...".
If the test is repeated and "Stop" is clicked after fewer than 5 seconds (i.e. while the script is still running), profiling works as expected: the profile stops recording, and it's possible to see the performance data.
The text was updated successfully, but these errors were encountered:
not-an-aardvark
changed the title
Inspector profiling can't be stopped or viewed after script finished running
Inspector profiling can't be stopped or viewed after script finishes running
Jul 23, 2017
When using the Profiler to measure performance in Chrome, it seems to be impossible to stop the profiler and view the data after the script has finished running.
Reproduction:
Create a file (
chrome-inspector-test.js
) that runs for 5 seconds and then exits:Run it with
node --inspect-brk chrome-inspector-test.js
Go to
chrome://inspect
in ChromeUnder "Remote Target" and "chrome-inspector-test.js", click "inspect".
In the new window, go to the "Profiler" tab and click "Start".
Wait for more than 5 seconds.
Click "Stop".
Expected behavior: After clicking "Stop", the profile should stop recording, and it should be possible to see the performance data.
Actual behavior: After clicking "Stop", the devtools window gets stuck looking like this. It's not possible to switch tabs. Profile 1 still appears to be recording, and it doesn't seem to be possible to stop it. The Node process is still running, and has printed "Waiting for the debugger to disconnect...".
If the test is repeated and "Stop" is clicked after fewer than 5 seconds (i.e. while the script is still running), profiling works as expected: the profile stops recording, and it's possible to see the performance data.
The text was updated successfully, but these errors were encountered: