Is there anyway enable blackbox framework when JS debugging in Webstorm

I was doing JS debugging in Chrome, but I've switch to Webstorm ever since I learned how to do it without leaving Webstorm, that's just awesome, but there's one thing I dont know how to do yet, which is enable blackbox framework when debugging, Chrome devtool allows you to do that, with that feature enabled, all the frontend framework call stack will be hidden, and you can step over only the applicaiton code, which allows you to focus on the application logic without dragging the framework code into the mix.

Is there anyway we can do that in Webstorm? thanks :)

8 comments
Comment actions Permalink

Please try playing withstepping options in Preferences/Build, Execution, Deployment/Debugger/Stepping- javascript debugger doesn't step into library scripts by default, plus you can explicitly specify the files you don't like it to step into

2
Comment actions Permalink

Thank you
Elena, I found it ! but it somehow does not work, the project that I'm working on has its framework code located in the root_path/resources directory, the debugger will step into those framework code even after I checked 'Do not step into library scripts'. Then I tried 'Do not step into scripts:' option as well, I specify one of the framework code file 'resources/ui-core.js', still, the debugger will step into this file anyway, am I missing something here? Thank you for your time.

0
Comment actions Permalink

WebStorm has no idea what code in your project is a library code unless you add the corresponding files to javascript libraries (Preferences/Languages&Frameworks/javaScript/Libraries). If you configure your framework .js files as libraries, 'Do not step into library scripts' should do the thing

0
Comment actions Permalink

I've added async_hooks.js to "Do not step into scripts", but WebStorm still stepped into it.

WebStorm 2018.3.2 EAP
Build #WS-183.4886.15, built on December 10, 2018
Licensed to twitter-lite / Dan Dascalescu
Subscription is active until December 14, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-42-generic

 

0
Comment actions Permalink

Does it step in it on stepping in/over, or pauses in it? The latter can be a known Node.js issue (https://github.com/nodejs/node/issues/15464)

0
Comment actions Permalink

WebStorm still opened async_hooks when I Force-Stepped-into a method call from an npm library.

import Twitter from 'twitter-lite';

// ...
const users = await twitter.post('users/lookup', {
screen_name: 'dandv'
});

 

0
Comment actions Permalink

This is expected - the Force Step Into command enables you to step into a method of a class not to be stepped into.(i.e. the stepping filters are ignored when using this command)

0
Comment actions Permalink

I've just noticed that if "Break on Exception" is enabled in the JavaScript debugger, WebStorm will also break into library scripts on exceptions, even if "Do not step into library scripts" is checked.

Is this intended?

0

Please sign in to leave a comment.