0

Is there a way in Chrome Dev Tools to hide JavaScript files so that I'm only looking at my TypeScript files? Bear in mind that I'm not referring to "blackboxing" the files. Rather, I want to completely hide them in the "Sources" tab.

6
  • 1
    What do you mean by "hide them" ? "so that I'm only looking at my TypeScript files?" Select the file to be viewed in center panel ? Not certain what requirement is ? Can you describe what you are trying to achieve ? Commented Apr 5, 2016 at 18:17
  • Can't you just filter the sources ? Commented Apr 5, 2016 at 18:17
  • @guest271314 Not sure how I can say it differently. I only want to see TypeScript files. I sometimes click too fast and open up the JavaScript file instead of the TypeScript file. If the former is not visible, my problem goes away. Commented Apr 5, 2016 at 18:20
  • @KennethK. Not sure following "click to fast" ? If the JavaScript file is opened by clicking without selecting TypeScript file, you can re-select TypeScript file ? If you only want to review or inspect a specific TypeScript file you can create a Snippets of the TypeScript file. You can also right-click at More options... and select Go to file... which should display a search bar where you can type in the file to load in center panel Commented Apr 5, 2016 at 18:23
  • @guest271314 I'm saying that my fingers are faster than my brain at times. When I debug, I debug using the TypeScript files (via sourcemaps). My breakpoints go in the TypeScript file. It does me no good to look at the JavaScript file. If I accidentally click on a JavaScript file, then I have to close it and click on the correct (TypeScript) file. If there is a way to hide the JavaScript files, then I won't ever accidentally click on a JavaScript file. Accidentally clicking on the wrong TypeScript file is still a concern, but the browser can't fix that ; ) Commented Apr 5, 2016 at 18:27

1 Answer 1

1

To avoid clicking on a .js file, do not click on any files under top. Instead click the More options... feature which should provide a Go to file... dialog which when selected should render an input field with a drop-down menu beneath listing all Sources files.

Either type in the TypeScript file name or select the file from the drop-down menu.

Alternatively, when Sources is open you can use Ctrl+p which should render the same input filed and drop-down menu.

Sign up to request clarification or add additional context in comments.

1 Comment

Not exactly what I was looking for, but it does the job as a workaround.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.