Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Prevent vscode node debugger from showing node_modules code

$
0
0

I'm trying to debug a really complex Angular 9 app in VSCode using Node Debugger, browser-preview and Debugger for Chrome, and the debugger leading me to node_module internal code constantly is driving me crazy.

I've tried using both Browser Preview: Launch and ng servewith this VSCode skipFiles configuration but the first one keeps entering node_modules, and the later is only trying to start chrome after i cancel te debugging process. (wich seems like a totally unrelated problem to the current topic, but i would like any opinions on that part if you feel like it)

I've already sent an issue to the maker of the browser-preview extension, since VSCode is giving me a Property not allowed warning with skipFiles. If anyone finds a problem and/or has a suggestion for the following launch.json, will be appreciated.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "browser-preview",
            "name": "Browser Preview: Attach",
            "request": "attach"
        },
        {
            "type": "browser-preview",
            "request": "launch",
            "preLaunchTask": "npm: start",
            "name": "Browser Preview: Launch",
            "url": "http://localhost:4200",
            "webRoot": "${workspaceFolder}",
            "skipFiles": [
                "${workspaceRoot}/node_modules/**/*.js",
                "<node_internals>/**/*.js"
            ]
        },
        {
            "name": "ng serve",
            "type": "chrome",
            "request": "launch",
            "preLaunchTask": "npm: start",
            "url": "http://localhost:4200/",
            "webRoot": "${workspaceFolder}",
            "skipFiles": [
                "${workspaceRoot}/node_modules/**/*.js",
                "<node_internals>/**/*.js"
            ],
            "sourceMapPathOverrides": {
                "webpack:/*": "${webRoot}/*",
                "/./*": "${webRoot}/*",
                "/src/*": "${webRoot}/*",
                "/*": "*",
                "/./~/*": "${webRoot}/node_modules/*"
            }
        }
    ]
}

enter image description here


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>